On Fri, 29 Sep 2006 13:45:01 -0700, Susan R wrote:
[Quoted Text] > I utilized the guidelines in "Micrsoft Office Assistance:Create a form to > enter report criteria" to create the macros, the form, and modify my report > and the underlying query. Everything seems to work fine independently; > however, when I open my report, and I enter the criteria, the form closes but > the report fails to open. Has anyone else used these guidelines and had the > same problem? If so, did you find a solution? Or does anyone have any ideas?
The form is not supposed to close until the report is closed. You can adapt the following method. Create an unbound form.
Also 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 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. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail
|