Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding date parameters to reports

Status
Not open for further replies.

maxfox44

MIS
Jan 16, 2003
1
GB
How do I add a form with date parameter fields such as start date and end date to filter a report?
 
maxfox44:

A quick and dirty way to achieve this filtering is to modify the report's record source.

In query design mode for the record source, on the criteria line for the date, add the following:

between [Enter start date] and [Enter end date]

When the report opens, a small window will pop up which says: Enter start date. After that date is entered a second little window will pop up which says: Enter end date.
When the second date is entered the record set will have only the records between those two dates.

You can put whatever you want to show up on screen inside the brackets.

There are other ways as well. You can create a little form which asks for both dates in text boxes. The form should have a 'Get report' button whose onClick event should then open the report.

But in this case you will need to enter the following in query design mode to the date's criteria line:


between forms![name of form which asks for dates]![name of control which has the first date] and forms![name of form which asks for dates]![name of control which has the last date]


Hope this helps

Vic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top