ACC: Error Message "Macro '' Not Found"

Last reviewed: May 7, 1997
Article ID: Q98226
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

When you are entering data using a form, you may receive the following error message:

   Macro '' not found

CAUSE

This behavior can be caused by one or more spaces having been inadvertently typed in either the form's or a control's event properties, such as OnCurrent or AfterUpdate.

RESOLUTION

Open the form in Design view and remove the space(s).

STATUS

This behavior is by design.

MORE INFORMATION

Microsoft Access trims the space when displaying the error message, so you see two single quotation marks with no space separating them, which looks like one double quotation mark.

You should be able to determine whether the space is located in a control's event property or a form's event property, based on what actions trigger the message.

For example, if the error occurs in one of the following situations, check the suggested properties.

  1. Opening the form:

        - Check the Form's OnOpen or OnCurrent property.
    

        - Also check the OnLoad property of forms in Microsoft Access 2.0, 7.0,
          and 97.
    

        - Check the OnEnter property for the first control that receives the
         focus when the form is opened.
    

        - Also check the OnGotFocus property of controls in Microsoft Access
          2.0, 7.0, and 97.
    

  2. Typing in a control:

        - Check the control's BeforeUpdate or AfterUpdate property.
    

        - Also check the control's OnKeyDown, OnKeyPress, OnKeyUp, OnChange
          properties in version 2.0.
    

  3. Saving a record:

        - Check the form's BeforeUpdate or AfterUpdate property.
    

  4. Moving to a new record:

        - Check the form's OnCurrent property (also see #3).
    

NOTE: this is not a complete list of causes.

Once you have determined which property is causing the behavior, open the form in Design view and remove the space from that property. If you are still not sure which property is causing the behavior, go to each property that is blank and press the DELETE key.

NOTE: You may have spaces in multiple properties; therefore, it is a good idea to check them all.

Steps to Reproduce Behavior

This example uses the sample database Northwind.mdb (or NWIND.MDB in Microsoft Access 1.x or 2.0).

  1. Open the Employees form in Design view.

  2. Display the property sheet by clicking Properties on the View menu.

  3. Select the Last Name control and type a single space in the AfterUpdate property.

  4. View the form in Form view and type data in the Last Name control. Note that when you attempt to exit this field, you receive the error message mentioned earlier in this article.

REFERENCES

For more information about event properties, search the Help Index for "Event Properties," or ask the Microsoft Access 97 Office Assistant.


Additional query words: space event
Keywords : FmsHowto kberrmsg kbusage
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : Info_Provided


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.

Last reviewed: May 7, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.