Dlookup into a query field using Date Criteria (1 Viewer)

Takunda Mafuta

Registered User.
Local time
Today, 04:49
Joined
Sep 4, 2019
Messages
13
I want to query figures from a table into my query using date criteria but when I run the query I get only blanks. The expression I'm using in the expression builder is as follows. See also attached images.
Code:
XE: DLookUp("EXCRate","ExchangeRates","EXCDate=#" & [DateEntered] & "#")
 

Attachments

arnelgp

error reading drive A:
Local time
Today, 19:49
Joined
May 7, 2009
Messages
9,852
DLookUp("EXCRate","ExchangeRates","EXCDate=#" & Format([DateEntered], 'mm\/dd\/yyyy') & "#")
 

isladogs

CID
Local time
Today, 12:49
Joined
Jan 14, 2017
Messages
13,602
DateEntered contains a time which you need to exclude.
Also, why not link the two tables in your query using the date part of the DateEntered field and ExcDate fields. This avoids the needs for a DLookup
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom