Pause Macro to enter data

DrPat

Registered User.
Local time
Yesterday, 23:37
Joined
Feb 7, 2011
Messages
39
I have a macro that prints a services log by month.

It begins by opening a form that gives the user a the opportunity to choose a month and a year via combo boxes. Then uses that month to run the various queries and finally open the report.

The problem is that the form opens, but the macro continues before the month and year can be chosen.

Is there a way to pause the macro at the OpenForm action, then continue once a command button is clicked?
 
I don't use macros, but in VBA you can use the acDialog option to open the form, and code will wait for it to be closed or hidden before continuing. I assume the same option is available within a macro.
 
Thanks Paul. I'm an amateur and typical don't use VBA unless I'm copying code that I know I won't have to edit later (as in the code that locks the scroll mouse in earlier versions of access).

I can't find anything in design mode that does the same trick. The form is a month/year picker and I don't want to copy it 8 or 10 times for each service log that needs to be printed.
 
It's the window mode argument of the OpenForm action in a macro. The option is Dialog.
 

Users who are viewing this thread

Back
Top Bottom