Let's say the date field in your query is named MyDate. You need to add two
calculated fields to your query. The first looks like:
=Month(MyDate)
and the second looks like:
=Year(MyDate)
Now put the following criteria in the first calculated field:
Month(DateAdd("m",-1,Date)
and put the following criteria in the second calculated field:
Year(DateAdd("m",-1,Date)
Your query will return only the records for the previous month.
If you want all records but the previous month, change your criteria to:
<> Month(DateAdd("m",-1,Date)
<> Year(DateAdd("m",-1,Date)
PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)