Controlling flow of actions

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!
 
S

Steve Schapel

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

ellen-b

Thanks, Steve, I was able to use the On Click event in the Select City form
to run the macro.

Appreciate the help!
 

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