Need help filtering dates in Access Query to return all records with date greater than or equal to the past two months.

I want to be able to pull in all records where the date is greater than or equal to the past two months. So, if I ran this query right now I would get all records with a date greater than or equal to 9/1/2016.

I get particularly hung up when trying to figure out how to make this work when crossing the new year. If the report is run on 1/10/2017 I need it to also pull in all records where the date is greater than or equal to 12/1/2016.

Thanks for the help!
LVL 2
Jarred MeyerProduction ManagerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Gustav BrockConnect With a Mentor CIOCommented:
That will be:

Where YourDateField Between DateSerial(Year(Date()), Month(Date()) - 1, 1) And Date()

/gustav
0
 
Jarred MeyerProduction ManagerAuthor Commented:
EXCELLENT! Thanks so much!
0
 
Gustav BrockCIOCommented:
You are welcome!

/gustav
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.