Hello, I have ctreated a Report date Range Form already and I would like a
pop up box to appear when I open a particular report to request the user to
enter a start date and an end date. How do I do this? Thank you!
Create an unbound form.
Add 2 unbound text controls.
Set their format to a valid date format.
Name them "StartDate" and "EndDate"
Add a Command Button to the form.
Code the button's click event:
Me.Visible = False
Name this form 'ParamForm'.
As criteria in the query (that is the Report's Record Source) date
field write:
Between forms!Paramform!StartDate and forms!ParamForm!EndDate
Next, code the report's Open event:
DoCmd.OpenForm "ParamForm", , , , , acDialog
Code the report's Close event:
DoCmd.Close acForm, "ParamForm"
When ready to run the report, open the report.
The form will open and wait for the entry of the starting and ending
dates wanted.
Click the command button and then report will run.
When the report closes, it will close the form.