Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple VBA queries/commands in sequence

Status
Not open for further replies.

verlorene

IS-IT--Management
Feb 8, 2005
3
I have a form with a button that when clicked runs over 30 commands. If I just press the button and let Access run them all they appear to be running in multiple simultaneous threads and finish out of order. To get them all to run in correct order I have to step through them in debugging mode. I need assistance in adding code between each of the steps to wait for the previous step to finish.

My code uses two ways of running queries:
db.Execute strSql, dbFailOnError
DoCmd.OpenQuery ("AppendFillQuery")

Thanks, any help would be appreciated.
 
Have a look at the DoEvents function.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top