Running access queries in sequence through Macro

bclmx

New member
Local time
Today, 09:10
Joined
Jul 20, 2009
Messages
7
Hey Guys,

I was wondering if there is a way to run queries automatically in sequence through Macro.
Basically what I need is to automatically run query 1 then query 2 once the query 1 has finished and then the query 3 once the query 2 is done.
Any idea how to do this? Is the only option VBA code?
Any help would be greatly appreciated.

Andy
 
Personally I would use code, but you can have more than one in a macro. Just repeat the action.
 
Personally I would use code, but you can have more than one in a macro. Just repeat the action.

So your saying the macro will not continue until the query is finished?

Does this go for macros calling macros too?

Is there an advantage to having one macro that calls out each individual queries or macros as opposed to having one macro start up and then the last function is to call the next macro? Like daisy chaining them together.

TIA.
 
Yes, I'm saying it should wait for a query to finish before starting the next, and it would work the same way for calling a macro.

I don't use macros, but the only reason I could see for "daisy chaining" them would be if certain macros could be called from different places, and you wanted to avoid having the same process in multiple macros. This would be similar in concept to when we create a public function in code. Other than that, you'd be creating unneeded objects and bloating the database.
 
That's cool. My only thought is that it might be easier to troubleshoot later if you had one macro calling many to step through as opposed to one that calls another that calls another that calls another, etc. Either way my biggest concern was that it would start another process before the last one finished because it could effect the results. Thanx Paul!
 

Users who are viewing this thread

Back
Top Bottom