## PRB: Space in Macro Name Column Stops Macro

Article ID: Q109707
Creation Date: 06-JAN-1994
Revision Date: 19-SEP-1996

The information in this article applies to:

- Microsoft Access versions 1.0 and 1.1

SYMPTOMS

Your macro stops running even though there are additional macro actions to be run and no other macro names are visible in the Macro Name column of the macro group.

CAUSE

This behavior can occur if there is a space in the Macro Name column. A space character in the Macro Name column is treated as a macro name and stops the execution of the macro on the line containing the space.

RESOLUTION

Check for spaces in the Macro Name column by selecting the first actual macro name. Then use the DOWN ARROW key to move the insertion point to the next row. If a space exists, the insertion point will appear slightly larger than it does in cells that are empty. To delete a selected space character, press the DEL key.

MORE INFORMATION

Steps to Reproduce Behavior

1. Open the sample database NWIND.MDB.
2. Create the following new macro:

>           Macro Name   Action
>           -------------------
>                        MsgBox
>           <SPACE>      MsgBox

>           MyMacro Actions
>           --------------------------
>           MsgBox
>              Message: First Message
>           MsgBox
>              Message: Second Message

- Run the macro. Note that only the first message box is displayed. If you remove the space from the Macro Name column, both message boxes are displayed when you run the macro.

  REFERENCES

  Microsoft Access "User's Guide," version 1.0, Chapter 21, "Macro Basics," pages 505-526, version 1.1, pages 509-530

> 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 halt run
KBCategory: kbusage
KBSubcategory: McrName