Microsoft KB Archive/109361

{|
 * width="100%"|

PRB: Macro Action Argument Runs with False Condition
'Article ID: Q109361

Creation Date: 02-JAN-1994

Revision Date: 19-SEP-1996' The information in this article applies to:


 * Microsoft Access versions 1.0 and 1.1

SYMPTOMS

Macro action arguments run, even though the macro condition is false.

CAUSE

This behavior is caused by an equal sign (=) in the action argument. Expressions with an equal sign are evaluated first by Microsoft Access. An action argument that begins with an equal sign runs before the macro condition is evaluated.

RESOLUTION

Remove the equal sign from the beginning of your macro action argument.

STATUS

This problem no longer occurs in Microsoft Access version 2.0.

MORE INFORMATION

Steps to Reproduce Behavior

 Start Microsoft Access and either create a new database or open an existing one.  Create a new macro with the following action: Condition: "False" Action: MsgBox Message: =InputBox("Message to display:")  Save the macro and then run it.

Note that the message box does not appear because its condition is false. However, the input box does appear.
 * }

-

"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." '' ©1997 Microsoft Corporation. All rights reserved. Legal Notices.

''

Additional reference words: 1.00 1.10 Macros

KBCategory: kbusage

KBSubcategory: McrArg