Queries

  • Thread starter Thread starter mbynoe via AccessMonster.com
  • Start date Start date
M

mbynoe via AccessMonster.com

Have 7 queries that I need to execute in order, with just one click of a
button on a form. What do I need to do to make this happen?
 
This sounds like a job for a macro!

Create a macro named "run7queries" or whatever. Each action will be an
"open query" (in the first column of the macro). For each line make
sure the properites at the bottom have a corresponding query.

Keep in mind that if you are running action queries you will have
multiple warning messages pop up when you run your macro. If you wish
to turn these off you will need a VB module instead, or you will need
to set each instance of Access to ignore warnings (not advised).

Once the macro is created and tested, go to the design view of your
form and right click on the button you want to run this macro. Select
properties for that button. Set the onclick property to the name of
your macro.

Voila!
 
There is a SetWarnings Macro action you can use to stop Access from warning
of the query actions ...

Equivalently, a Sub with 7 OpenQuery statements or personally, I prefer to
use the Execute method as run-time errors can be trapped with the Execute
method.
 
Thanks!

This sounds like a job for a macro!

Create a macro named "run7queries" or whatever. Each action will be an
"open query" (in the first column of the macro). For each line make
sure the properites at the bottom have a corresponding query.

Keep in mind that if you are running action queries you will have
multiple warning messages pop up when you run your macro. If you wish
to turn these off you will need a VB module instead, or you will need
to set each instance of Access to ignore warnings (not advised).

Once the macro is created and tested, go to the design view of your
form and right click on the button you want to run this macro. Select
properties for that button. Set the onclick property to the name of
your macro.

Voila!
Have 7 queries that I need to execute in order, with just one click of a
button on a form. What do I need to do to make this happen?
[quoted text clipped - 4 lines]
Message posted via AccessMonster.com
 
Back
Top