Look Up value in a query (1 Viewer)

AnnPhil

Registered User.
Local time
Today, 01:15
Can you use the DLookup function to look up a value in a query w/o putting in a criteria? Or is there another funtion that i should use.

Have a report that needs a value from a query but it not the record source of the report.,
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 17:15
Sure, but you'll get the value from the first record in the query. If that's okay, then you don't need a criteria.
 

AnnPhil

Registered User.
Local time
Today, 01:15
That's fine, how do i leave the criteria section, i tried the following but it didn't work

DLookup ("[fieldname]","[queryname]","")

Thanks
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 17:15
Leave it out completely:

DLookup("[fieldname]","[queryname]")
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 17:15
Good point; it does need the = as a control source.
 

Users who are viewing this thread

Top Bottom