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].
 
Back
Top