If you want the two months prior to the current month, use this criteria
Between DateSerial(Year(Date()),Month(Date())-2,1) and
DateSerial(Year(Date()),Month(Date()),0)
IF you want records for two months and those two months are dependent on the
Latest date in the field in the table. Replace Date() with
DMax("TheDateField","YourTableName") in the above expression.
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
Hong said:
Hello: Rick
How about if I want to limit records always two month back in the query?
for
example: count from the last record back to two month?
Thank you!
Rick B said:
add a new column to your query...
MonthOfRecord: Month([YourDateFieldName])
Then in the criteria, put...
= Month(Date())
Rick B
James Allen said:
I have a date field in my record. How do I write my query to limit my
returns to only records where the date is in the current month?