Hello,
Im having some issues with dlookup. Im trying to get a value from a query and insert it into a specific field on a form.
Here is the code im trying to use:
Forms![Main Booking Form]!CustomerID=DLookUp("[CustomerID]","Qry: Contacts","CustomerID=" & Forms![Main Booking Form]!CustomerID)
The form field is 'Forms![Main Booking Form]!CustomerID' i want the data to come from the 'CustomerID' column from the 'Qry:Contacts' query. Now this part i cant get round to. I want the record thats in the 'CustomerID' Column within the 'Qry:Contacts' Query to go in the 'Forms![Main Booking Form]!CustomerID' which is a field called 'CustomerID' on the 'Main Bookin Form' (as if you couldnt tell
).
I cant seem to work this out and ive also searched forums and google.
Much Appreciated for the help.
Regards,
Topham
Im having some issues with dlookup. Im trying to get a value from a query and insert it into a specific field on a form.
Here is the code im trying to use:
Forms![Main Booking Form]!CustomerID=DLookUp("[CustomerID]","Qry: Contacts","CustomerID=" & Forms![Main Booking Form]!CustomerID)
The form field is 'Forms![Main Booking Form]!CustomerID' i want the data to come from the 'CustomerID' column from the 'Qry:Contacts' query. Now this part i cant get round to. I want the record thats in the 'CustomerID' Column within the 'Qry:Contacts' Query to go in the 'Forms![Main Booking Form]!CustomerID' which is a field called 'CustomerID' on the 'Main Bookin Form' (as if you couldnt tell

I cant seem to work this out and ive also searched forums and google.
Much Appreciated for the help.
Regards,
Topham