View Full Version : Running Queries with Macros?


Coach Ty
09-07-2009, 04:36 PM
Hello,
I have a basic question:
I'm new to access and I'm just learning about how to create macros.
Can you please tell me if it's possible to run a series of queries by using a Macro that includes these queries in sequence?

It's my understanding that you can run a series of macros in a group and the macro group will run in sequence. Therefore, my question is, can macros be based on queries and if this is possible, is there a limit in how many macros / queries can be ran in sequence?

My purpose is to run a series of queries in the most efficient and fastest manner. They are always ran in sequence and based on the results of each query, but running each individual query manually, is a very time consuming process.
Thanks for your help ...

pbaldy
09-07-2009, 06:21 PM
Personally I would use code, but a macro can run queries in sequence. Look up specifications in help for the max number for your version. I believe 2007 is 999.

Coach Ty
09-07-2009, 06:58 PM
Thanks for your reply.
I'm using Access 2007. When you say code are you referring to VBA? Or using MS Access code?
What type of code would you use?

pbaldy
09-07-2009, 07:44 PM
VBA. CurrentDb.Execute or DoCmd.OpenQuery

Kay Davies
09-16-2009, 09:00 AM
Hello
You can run a series of queries via a macro. Give your macro a name and then in the Action column select 'Open Query' and then select the query in the bottom box. Repeat this for each query and then see if it runs correctly.

Hope this helps.
:)

Coach Ty
09-16-2009, 09:10 AM
Thank you very much for responding Kay. I have all of my queries in order and am about to prepare my macros. I have a ton of queries to run, which will now become macros. So, from there I will organize the macros into groups to simplify the procedure.

Thanks for your help,
;)