DLookup question

  • Thread starter Thread starter Andy Levy
  • Start date Start date
A

Andy Levy

=DLookUp("[paymentStartDate]","[consultform]","[ID] = " & me.customerID)

I am using the above line as the control source for a text box - but it is
not working. Any ideas ??

The form the text box is sitting on has a different control source than
"consultform".
 
Andy Levy said:
=DLookUp("[paymentStartDate]","[consultform]","[ID] = " & me.customerID)

I am using the above line as the control source for a text box - but it is
not working. Any ideas ??

The form the text box is sitting on has a different control source than
"consultform".

Try...

=DLookUp("[paymentStartDate]","[consultform]","[ID] = " & me.customerID &
"")
 
1. Remove square brackets around consultform.

2. Change me.customerID to:

Forms!NameOfYourForm!CustomerID

Also, DLookup can only lookup something in a table or query. Is consultform a
table or query?
 
A DLookup says: "Open tblMyTable, find row = some value, and tell me the
value that is stored in some column of that record". Is this what you're
trying to do? Naming conventions seem to be a problem.
 
Back
Top