This is from a Microsoft sample database to prefill City, Postal Code and
Region fields
Dim rs As Object
Set rs = Me.Recordset.Clone
If rs.EOF Or Not Me.NewRecord Then
' don't do anything if there's no records or it is not a new record
Else
With rs
.MoveNext
Me![City] = .Fields("strCity")
Me![PostalCode] = .Fields("strPostalCode")
Me![Region] = .Fields("strRegion")
End With
End If
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.