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

Printing date ranges

Status
Not open for further replies.

Ryker7

MIS
Jun 19, 2003
44
0
0
US
How do I print date ranges on the header of a report? The query that the report is based on ask for a range of dates. I would like to print the range on the header of the report for informational puposes.
 
Stick a text box in the header and, in the control source (data tab), enter the value you want...
Code:
="From " & Format(YourStartDate, "mm/dd/yyyy") & " To " & Format(YourEndDate, "mm/dd/yyyy")

< M!ke >
 
For the following example, I am querying a table with three fields: &quot;FName&quot;, &quot;LName&quot;, and &quot;Date&quot;.

The query's SQL syntax would be:

SELECT Table1.FName, Table1.LName, Table1.Date
FROM Table1
WHERE (((Table1.Date) Between [StartDate] And [EndDate]));

Then, I place a text box in the report header, and set the text box's Control Source property to:
=&quot;between &quot; & [StartDate] & &quot; and &quot; & [EndDate]

That should do it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top