Close Form Macro

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?
 
K

Ken Snell

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.
 
V

Van T. Dinh

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top