Select all dates in month from month and year in text box?

  • Thread starter LeeZard via AccessMonster.com
  • Start date

L

LeeZard via AccessMonster.com

I have a form to run reports. All reports are run based on the month and
year but the table data contains actual dates. On the form the client enters
03/2007 in a text box to select reports containing data for March 2007. The
text box has a format mm/yyyy. The table data has fields defined as
Date/Time. Data looks like 3/15/2007. How can I use the month and year from
the text box my form to select all of the dates that fall within the month
and year requested?
 
Ad

Advertisements

J

Jerry Whittle

In the criteria of the query that drives the report:

Between [Forms]![frmParameterDates]![txtParameter] And
(DateAdd("m",1,[Forms]![frmParameterDates]![txtParameter])-0.0001)

Make sure to use the actual form and field name. Remember that the form must
stay open but can be hidden or invisible.
 

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

Top