PRA: Macro with Action on Different Line Does Not WorkArticle ID: Q109349Creation Date: 02-JAN-1994 Revision Date: 19-SEP-1996
The information in this article applies to:
SYMPTOMS
If a macro line contains a false condition with no action, or the action
is on a different line, the macro does not execute correctly.
For example, the following macro results in a message box, even though no
message box should be displayed (because the condition is false):
CONDITION ACTION ---------------------- 1=2 ... MsgBoxIn the following example, no message box is displayed because the condition is false and the action is on the same line as the condition:
CONDITION ACTION ---------------------- 1=2 Beep ... MsgBoxIf a condition is true, but the action is on a different line, the rest of the macro group will not run.
RESOLUTION Put a macro action on the same line as the condition.
STATUS Microsoft has confirmed this to be a problem in Microsoft Access versions 1.0 and 1.1. This problem no longer occurs in Microsoft Access version 2.0. |
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.