DLookup question

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".
 
R

Rick Brandt

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 &
"")
 
P

PC Datasheet

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?
 
R

Rolls

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.
 
Top