Querying by Month

michellecahal

Registered User.
Local time
Today, 04:22
Joined
Aug 3, 2011
Messages
19
I hope this is an easy question...

If I have several entries for the past few years, is there a way I can query for a certain month's worth of data?

For example, I have 3 years worth of data, including a date field, but I need to find all entries for May 2011.

Thank you for your help!

Using MS Access 2010
 
Change [DateField] to your date field and add this WHERE Clause to your query's SQL:

WHERE Month([DateField])=5 AND Year([DateField])=2011
 
Sorry for the lag time! Thanks so much for your help!
 
To make it more "flexible" instead of hard coding in the value, why not either use a form to select the month and year?
 

Users who are viewing this thread

Back
Top Bottom