We help IT Professionals succeed at work.

Search query for Month MS Access

introlux asked
Medium Priority
Last Modified: 2012-05-06
Hi Experts,

I am using MS Visual Studio .Net 2005 - I am using a MS Access as my back end. I have used this method of inserting date into the field:

Now that the dates are inserted, I am looking to create and run a query to search ONLY the month. I.E To search for records in august ONLY - I would like it to display an out put of all records in that month. I am aware of the fact that it will also display 2006, 2007 etc.. records but will like to sort it newest entry order.

Any help relating in compiling this query within MS Visual Studio 2005 .Net c# using MS Access as my database will be appreciated.


Watch Question

In Access it should be something like

SELECT .....
FROM ....
WHERE Month([date_filed_name]) = 8

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

...If you want a parameter prompt to pop-up so you can type in month value, you can modify the above code slightly:

SELECT .....
FROM ....
WHERE Month([date_filed_name]) = [Enter a Month Number]

(Of course you can build an interface in Access with a drop down displaying months from which to choose from, but that is another issue.)

introluxTechincal Director


This works! Thanks for the reply!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.