OpenReport where clause

chelm

Registered User.
Local time
Today, 08:59
Joined
Oct 17, 2007
Messages
43
I’m not quite sure where to post this because it is a query of table that is being used to generate a report, but is being opened with a the OpenReport macro. In the where condition I have this:

Year([ActualDropOffDate])=Year(Now()) And DatePart("q",Date())=DatePart("q", Now())

But I must have something wrong with the syntax because it’s opening up everything for the entire year. I’m using a similar OpenReport for previous quarters with no issues:

Year([ActualDropOffDate])*4+DatePart("q",[ActualDropOffDate])=Year(Date())*4+DatePart("q",Date())-1

Any advice is greatly appreciated.

Edit:
Sorry for the post, I think I figured it out.
Year([ActualDropOffDate])=Year(Now()) And DatePart("q",[ActualDropOffDate])=DatePart("q", Now())
 
Last edited:

Users who are viewing this thread

Back
Top Bottom