Date Range in Reports

  • Thread starter Thread starter Pearl
  • Start date Start date
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?
 
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")
 
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
 
Back
Top