Date calculation as criteria in Queries

S

Super Wife Mom

HELP!!! I have a query with a date field, TransDate. I want to pull up all
records where the month section of TransDate is one calendar month before
today's date. For instance: If today is 11/10/2006 then it would pull up
all records where TransDate was between 01/09/2006 and 30/09/2006.
 
A

Allen Browne

In the Criteria row of query design, under the TransDate field, enter this,
all on the one line:

Between DateSerial(Year(Date()), Month(Date())-1, 1) And
DateSerial(Year(Date()), Month(Date()), 0)
 
S

Super Wife Mom

Allen,

Just tried it out and it worked a treat. Thanks for your help!

Super Wife Mom
 
Top