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!

Printing Date Range

Status
Not open for further replies.

jake7363

Technical User
May 31, 2006
56
Hi,
I am designing a report based on a query using BETWEEN in reference to dates.
The question is, how do i get the date range to be printed on the report?

Thanks in advance,
Jake
 
If you are using DoCmd.OpenReport to open the report, you can pass the date range as a string in the OpenArgs parameter (of DoCmd.OpenReport)...

DoCmd.OpenReport "Report1", acViewPreview, , , , "Date Range: " & dtmFromDate & " TO " & dtmEndDate
 
Then, in the Open event of your report, you can set an unbound field in your report header to the value of OpenArgs...

Me.txtDateRange.Value = OpenArgs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top