Date Range in Reports

P

Pearl

I have a report that is composed of 2 subreports. One of the subreports is
based on a query that has a date range parameter ([start date] and [end
date]). So, when I preview the report, I am asked to input the [start date]
and [end date]. I would also like to place in the Report Header, those same
dates inputted. how can I do that?
 
M

Marshall Barton

Pearl said:
I have a report that is composed of 2 subreports. One of the subreports is
based on a query that has a date range parameter ([start date] and [end
date]). So, when I preview the report, I am asked to input the [start date]
and [end date]. I would also like to place in the Report Header, those same
dates inputted.

A report text box can refer to a parameter the same way you
refer to a field in the query.

E.g. you might want to use a text box expression similar to:

="From " & Format([start date], "d mmm yyyy") & " Through "
& Format([end date], "d mmm yyyy")
 
J

Jeff Boyce

Marshall's approach will get your parameters.

Another approach is to use a "report order form" to collect parameters for
your report(s) and refer to the values in that form from your query's
selection criteria and/or your report, using something like:

Forms!YourReportOrderFormName!YourFirstCriterionControl

Forms!YourReportOrderFormName!YourSecondCriterionControl

... and so on...


Regards

Jeff Boyce
Microsoft Access MVP
 

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