Instead of letting the query prompt you, when you open the report have the report pop-up a
form to ask for those dates. Do this in the Form's Open event, before the record source is
read. Open the form with the acDialog window mode parameter to stop the code from running
until the form is closed or hidden. There would be 2 text boxes on the form (one for each
date), a label explaining what you want, and Ok and Cancel buttons. When you click Ok, you
will verify that correct data has been entered into the text boxes then hide the form
(Me.Visible = False). If Cancel is clicked, close the form. Have the next line of code in
the Open event check to see if the form is open (hidden is still open). If it isn't, then
you know that the user chose Cancel and you can Cancel the Open Event of the report as
well. If it is, then just let the report continue to open.
In the query, your Between statement will now refer to the 2 textboxes on the form for the
parameter.
Between Forms!frmMyPopup!txtStartDate And Forms!frmMyPopup!txtEndDate
Access will probably put brackets around the components above when you exit the box in the
query design grid.
Between [Forms]![frmMyPopup]!.....
When you exit the report, close the form.