Sorry, But I am getting a little lost on the line:
DoCmd.OpenForm "ParamForm",,,,,,,acDialog
The report is opening fine, the report is opening fine, but it is not
accepting the date input
Thank you for your help.
I have 2 queries that generate 2 reports, both queries ask for "starting
date" and "ending date" these reports are always run together. Is there a
way where the date parameters can be passed to the second query, with out
asking for user input a second time?
one query uses "Data_Assigned" and the other one uses "Date_Issued"
Thanks for your time and patience
You'll need to use a form to do this.
First, create the queries that will display the fields you wish to
show in the report.
Second, create the reports, using a query as it's record source, that
shows the data you wish to display for ALL records.
Next, make a new unbound form.
Add 2 unbound text controls to the form.
Set their Format property to any valid date format.
Name one "StartDate".
Name the other "EndDate".
Add a command button to the form.
Code the button's Click event:
Me.Visible = False
Name this form "ParamForm"
Go back to each query.
As Criteria on the DateField, write:
Between forms!ParamForm!StartDate and forms!ParamForm!EndDate
Code the first Report's Open Event:
DoCmd.OpenForm "ParamForm" , , , , , acDialog
Code the second Report's Close event:
DoCmd.Close acForm, "ParamForm"
Run the first Report.
The report will open the form.
Enter the starting and ending dates.
Click the command button.
Both Report's will display just those records in the date range
selected.
When the second Report closes it will close the form.