Date calculation as criteria in Queries

G

Guest

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top