Parameter Query mm/yyyy

  • Thread starter Thread starter Matt W via AccessMonster.com
  • Start date Start date
M

Matt W via AccessMonster.com

I'm having trouble figuring out what to put in the criteria in my query to
pull the correct info for my report. My report is grouped by month. I would
like to be able to have users type in a month/year and get that back. I set
up a form to promt for mm/yyyy. Any ideas?
 
If you just want to group by month, the report wizard shows you how to do
that by example. If you want to FILTER to a single month, try this:

Prompt for YourDate as mm/yyyy, store this in a text box on the form (it
will actually store the first day of the month, even though it is not
displayed), and in the query, stipulate two criteria on the same line to make
it an AND:

Field: Month(DataNeeded)
Criteria: = Month ([Forms]![YourForm]![YourDate]

Field: Year(DataNeeded)
Criteria: = Year ([Forms]![YourForm]![YourDate].
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top