Link to home
Start Free TrialLog in
Avatar of ecohouse
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?
ASKER CERTIFIED SOLUTION
Avatar of Trygve
Trygve

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ecohouse
ecohouse

ASKER

That doesn't work because I am putting in a date range for that field (i.e. 1/1/97 - 12/31/97).  It seems that your solution only works for one date.  I had set up the criteria as follows:

    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.
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.


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.
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 !
Thanks for all the help.