Close Form Macro

  • Thread starter Thread starter Tracey
  • Start date Start date
T

Tracey

I have a form that requires the user to enter begin date
and end date for a report period. On the form, the command
button goes to a very simple macro:
OpenReport (the name of the report)
Close (the name of the form)

The procedure runs correctly (ie. the report selects
records for the correct time period), but the date prompt
form will not close when the report is displayed. I've
built another report with a similar macro and it works
perfectly, closing the date prompt form when the report
displays. Has anyone encounter a macro hanging like this?
 
Is the report being opened in "preview" mode? If yes, the macro will stop
running until the report is closed, and then it will close the form.

List the actual macro steps that you're using, with arguments.
 
Try Macro actions in the following sequence:

* Make the Form invisible.
* Open your Report.
* Close the Form.

I assume you Report gets the Parameter values and therefore you don't want
to close the Form before opening the Report. When you make the Form
invisible (to us), the values are still available for the Report. When you
close the Report, the Macro will continue and close the Form (3rd step).
 
Back
Top