Adding records

T

tezza

User clicks on Add Enquiry button. Screen is displayed containing blank
fields. When the customer code is entered I want to display the customer name
and address on the screen. Any ideas?
 
D

Dennis

The following assumes the customer code is text.
Set the control source property of the Customer Name field to

=DLookUp("[CustomerNameField]","CustomerTable","[CustomerCode] = '" &
Me.txtCodeField & "'")

Me.txtCodeField is the name of the box on your form where you have entered
the customer code. Do the above for the address lines but use

=DLookUp("[Address1]", .......
 
Top