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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically Putting Criteria Such As A Date Range In Report Header

Status
Not open for further replies.

daryn21

Technical User
Feb 7, 2007
1
US
Hello,

I have a report in Microsoft Access 2003 which the user will be able to key in a date range before the report is run. What I need is to show this date on my title and have it pull the date range in dynamically from when I keyed it in as part of the criteria.

Here are the steps done thus far:

Include the dates in the query your report is based on.

Add extra columns which repeat the report criteria as fields.

So assuming you have criteria such as :

Between [Enter start date] and [Enter end date]

you create two new columns:

Start:[Enter Start Date]
and
End:[Enter End Date]

These columns will then be available as fields in your report and you can add them to the header.

But the problem is that we are now being prompted for the criteria twice. I am sure that this should be something easy to figure out, but I just don't see it. Please help.

Daryn Hyland
 
Just add the exact criteria you use in your query to a textbox in your report. So in the header, put a textbox with the control source set to

="Between " & [Enter Start Date] & " and " & [Enter End Date]

You don't have to repeat criteria in your query to do this.

Paul



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top