ecohouse
asked on
Report Dates
I am running a report that uses a query as the record source. In that query I am using one of the columns (Bonus Date) to specify the date parameters for the report.
So when the query opens it asks for a start date and an end date for this one column. My problem is that when I run the report I want to put those parameter dates in my report heading (i.e., 01/01/97 - 12/31/97). Is it possible to take that information and do that?
So when the query opens it asks for a start date and an end date for this one column. My problem is that when I run the report I want to put those parameter dates in my report heading (i.e., 01/01/97 - 12/31/97). Is it possible to take that information and do that?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Easy, just put two columns in your query. ReportStartDate: CVDate([Report Start Date]) and ReportEndDate: CVDate([Report End Date]). The change your criteria to Between CVDate([Report Start Date]) And CVDate([Report End Date])
This worked in my test app.
This worked in my test app.
ASKER
That seemed to work okay. But the more I read from newsgroups it seems that I would be much better off using a form to input the information. I am going to look into that.
Thanks for the help.
Thanks for the help.
You are right. The form will give you the possibility of have combo boxes that the user can select the dates from, control of the input of the dates etc. etc. You can refer to the controls on the form from your query by forms![FormName]![Control Name]. I would perhaps include the CVDate function to be sure. You may also build the complete SQL statement for the report/form that is to be opened or just build the criteria and open the form/report with this.
Good Luck !
Good Luck !
ASKER
Thanks for all the help.
ASKER
Between [Report Start Date] and [Report End Date]
So when I run the query it opens up two windows one for the start date and one for the end date.
That is also the information that I am also trying to put in my report header.