Criteria Lookup Fiscal Month (1 Viewer)

redxtb

Registered User.
Local time
, 18:40
Joined
Feb 11, 2014
Messages
16
I have 2 tables tblSales & tblFiscalDates.

In tblSales, I have datWeekended and curSales.
In tblFiscalDates I have datWeekEnd(Saturday); datWeekStart (Sunday); datFiscalMonth; datFiscalYear; datFiscalQtd

In my query I want to use a criteria that uses Now() to get fiscal month. I have tried using a dlookup but with no luck... any ideas?

Thanks in advance!!!
 

pbaldy

Wino Moderator
Staff member
Local time
, 18:40
Joined
Aug 30, 2003
Messages
36,139
What was your attempt that failed?
 

redxtb

Registered User.
Local time
, 18:40
Joined
Feb 11, 2014
Messages
16
it was something like this.... i have long deleted it now.. I tried several different ways. like adding table names to the beginnig of everything.
dlookup("datFiscalMonth", "tblFiscalDates", "now() between " & datWeekStart & " AND " & datWeekEnd
 

pbaldy

Wino Moderator
Staff member
Local time
, 18:40
Joined
Aug 30, 2003
Messages
36,139
Try this shot in the dark:

dlookup("datFiscalMonth", "tblFiscalDates", "datWeekStart <= Date() AND datWeekEnd >= Date()")

If that doesn't work:

dlookup("datFiscalMonth", "tblFiscalDates", "datWeekStart <= #" & Date() & "# AND datWeekEnd >= #" & Date() & "#")
 

Users who are viewing this thread

Top Bottom