StopAllMacros - macros continue to run

R

RL

I have a button on a form, which should do different things depending on
1. The data contained within the current record;
2. Whether the current record is a 'new record';
3. Whether the current record is the first record in the form.

On click, an embedded macro is initiated. Each step in the embedded macro
has a condition and a corresponding 'RunMacro' action.

All the conditions are mutually exclusive, and each sub-macro has a final
step of 'StopAllMacros'. So the embedded macro should trigger one, and only
one sub-macro.

However, it appears that what is actually happening is:
1. The embedded macro works through each step sequentially.
2. If a sub-macro is triggered, Access returns to the embedded macro and
continues to work through each step sequentially, regardless of the
StopAllMacros action.
3. Because the sub-macros affect the current record, subsequent conditions
are occasionally met and more than one sub macros are run (often resulting in
error messages).

Have you any idea why the StopAllMacros fail to stop the Embedded Macro? I
only want one sub-macro to run per button click.
 

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