How do I populate a form with the data from a previous order ....

I

immelia

I want to enter a surname in my form and populate other fields in the form if
I have had an entry from that person before.
 
M

Michel Walsh

Hi,



With Me.RecordsetClone
.FidFirst "nameID=""" & Me.NameID & """"
If .NoMatch then
' avoid exiting the scope while a With is in effect
Else

Me.Address = .Fields(Address)
Me.City = .Fields(City)
...
End If
End With


(be caserful about the dots starting expressions)


Hoping it may help,
Vanderghast, Access MVP
 
Top