Query Parameter - Retrieve Month & Year Only?

Posted on 2003-03-31
Medium Priority
Last Modified: 2012-06-21
I would like to create a query parameter that queries a date field in a query. The date is stored as  ’27-Mar-03’ .   I would like to be able to enter just the  Month and Year ( Mar-03 ) to retrieve all rows of data that have the Month and Year regardless of the day?  How do I code the criteria field of the Date? ... ... ... Thanks
Question by:moongamb
LVL 17

Accepted Solution

Natchiket earned 120 total points
ID: 8239238
One solution:

Between CDate("1/" & [ParaDate]) And DateAdd("m",1,CDate("1/" & [ParaDate]))-1

Author Comment

ID: 8239346
Natchiket  - Worked like a charm .... Thank ya much!

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question