Controlling flow of actions

  • Thread starter Thread starter ellen-b
  • Start date Start date
E

ellen-b

Hello,
I'm having trouble getting my macro to perform actions in the correct order.
Here's what I wrote:
OpenForm: Form requires user to select a City from combo box
OpenQuery: Append query uses City from above Form
OpenQuery: Append query #2 uses same City as above

When I run the macro it opens the Form but doesn't wait for the user to
select the City, instead it moves directly to the first Append query which
results in appending 0 records. If you click OK to that action, it moves to
the second Append query with the same result.

I tried creating a separate macro to open the Form and substituted RunMacro
for OpenForm as the first action but it made no difference.

Any suggestions?
Thank you!
 
Ellen,

You will need to run the append queries from a separate macro via an
applicable event on the second form. Perhaps the After Update event of
the City combobox? Or the Click event of a command button on the second
form?
 
Thanks, Steve, I was able to use the On Click event in the Select City form
to run the macro.

Appreciate the help!
 
Back
Top