skip a step

S

shank

I have a macro that runs quite a few queries. Some of the queries take much
longer to run and don't actually need to run all the time.

How can I add a prompt or similar to a macro that does something like "Run
MAKE table query? Yes/No?"

Of course, I don't want it to stop the macro. I just want to skip a step.

thanks
 
S

Steve Schapel

Shank,

In the Condition column of the macro design, for the OpenQuery action in
question, put like this...
MsgBox("Run Make-Table query?",547,"Confirm")=6

(If you don't see a Condition column, select it from the View menu.)
 
S

shank

Very much appreciated... however, can you lend more insight?

You gave me... and it works fine
MsgBox("Run Make-Table query?",547,"Confirm")=6

The HELP section gives this example....
MsgBox("Confirm changes?",1)=1
Which is quite a bit different than yours.

What does 547 represent? (as opposed to 328,247,398, etc)

What does = 6 represent? (as opposed to 1,2,3,4 or 5)

thanks!
 
S

Steve Schapel

Shank,
The HELP section gives this example....
MsgBox("Confirm changes?",1)=1
Which is quite a bit different than yours.

The first 1 means the Message Box will show OK and Cancel buttons.
What does 547 represent? (as opposed to 328,247,398, etc)

3 means the Message Box will show Yes and No and Cancel buttons.
32 means there will be a [?] icon.
512 means the 3rd button (Cancel) will be selected by default.
Add them up = 547 :)

These values can be found in Access Help, inder MsgBox function.
What does = 6 represent? (as opposed to 1,2,3,4 or 5)

6 represents Yes
7 represents No
1 represents OK
 

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