Dlookup Query

darreno

Registered User.
Local time
Today, 08:46
Joined
Jun 16, 2007
Messages
54
I have qrData with AcctNo and Balance column and would like to pull certain AcctNo with their respective Balances in a report. I tried using Dlookup but failed. This is my code =Dlookup("Balance","qrData","AcctNo=1000")
Or, should I even use Dlookup??

Thanks for any help.
 
Looks like you're almost there.

If AcctNo is a number, the line should read as you have it
=Dlookup("Balance","qrData","AcctNo=1000")

If it's a string, try
=Dlookup("Balance","qrData","AcctNo='1000'")
 
Just to be exacting, try

=DLookup( "[Balance]", "qrData","[AcctNo]=... ) - and you fill in whatever account number you were considering.

Alc's comments are right on target, though. You need to know the data type of the field in your query and match that with what you give DLookup.
 

Users who are viewing this thread

Back
Top Bottom