Dlookup not working (1 Viewer)

Djblois

Registered User.
Local time
Yesterday, 21:22
Joined
Jan 26, 2009
Messages
598
I am trying to use this dlookup as my Control Source for a textbox:

Code:
DLookUp("Customer","tblCustomer","Customer_ID = " & [Forms]![frmSellingMain]![tbCustID])

I cannot figure out why it is not working. The syntax looks correct and I checked the spelling over and over.
 

SOS

Registered Lunatic
Local time
Yesterday, 21:22
Joined
Aug 27, 2008
Messages
3,517
If CustomerID is a text value you would need:

=DLookUp("Customer","tblCustomer","Customer_ID = " & Chr(34) & [Forms]![frmSellingMain]![tbCustID] & Chr(34))

and make sure the equals sign is there.
 

Users who are viewing this thread

Top Bottom