Stopallmacros

R

RL

Good morning,

I have a button on a form which triggers a macro. The first step of the
macro is to open another form in dialog mode, which asks them 'Is the
information correct'.

As this second form is in dialog mode, the first macro pauses until it has
been closed.

There are two buttons on the second form; 'Yes' and 'No'.

'Yes' simply closes the second form so that the original macro can continue.
I want 'No' to close the second form and stop the original macro from
finishing.

If I put 'StopAllMacros' as the first step followed by 'Close', the second
form is never closed because the macro that would close it has been stopped.

Conversely, if I 'Close' first followed by stop all macros, Access reverts
to the original macro as soon as the second form is closed so that the
StopAllMacros command never executes.

Is there anyway I can StopAllMacros except the current one? Or can I set a
macro parameter that makes it immune from the StopAllMacros command?

Thanks in advance.
RL
 
S

Steve Schapel

RL,

Is there any reason why you want to use your own form to ask the
confirmation question, as against a standard MsgBox?

What version of Access are you using?
 
R

RL

No reason at all, no! Didn't know whether you could control what happened
after the standard message box, so have always used forms.

I'm using Access 2007.
 
S

Steve Schapel

RL,

Ok. Well, dispense with the second form then, and put the equivalent of
this in the Condition of the action(s) that are dependent on user
confirmation:
MsgBox("Is the information correct?",36)=6
(6 is the numerical constant for 'Yes')
 
R

RL

Great, cheers Steve.

Steve Schapel said:
RL,

Ok. Well, dispense with the second form then, and put the equivalent of
this in the Condition of the action(s) that are dependent on user
confirmation:
MsgBox("Is the information correct?",36)=6
(6 is the numerical constant for 'Yes')
 

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