View Full Version : Need help setting up a filter


NightWatch
01-16-2002, 06:58 AM
I need to filter my records via a date filter. I want to print a report of only certain records which have been updated in the last (or current) month. The records are date logged so it should be easy to tell access to only show the records date records which correspond to the current month but I dodnt know how. I need help with the criteria field in my query.

thanks!

David R
01-16-2002, 07:46 AM
This came from searching for 'current month' in the Queries Forum:

You can make two calculated fields (they can be invisible):
FieldMonth: DatePart("m",[DateField])
FieldYear: DatePart("yyyy",[DateField])

Then in the respective criteria boxes:
DatePart("m",Date())
DatePart("yyyy",Date())

HTH,
David R