Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ACC2000: Can't Find Macro Error Message


View products that this article applies to.

This article was previously published under Q209582
Moderate: Requires basic macro, coding, and interoperability skills.

↑ Back to the top


Symptoms

When you are entering data in a form, you may receive the following error message:
Microsoft Access can't find the macro '.'

↑ Back to the top


Cause

This behavior can occur if you inadvertently type one or more spaces in the event properties of either a form or a control, such as in the OnCurrent or the AfterUpdate property.

↑ Back to the top


Resolution

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

↑ Back to the top


More information

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.

  • Opening the form:
    • Check the Form's OnOpen, OnCurrent, or OnLoad property.
    • Check the OnEnter property for the first control that receives the focus when the form is opened.
    • Check the OnGotFocus property of controls in Microsoft Access.
  • Typing in a control:
    • Check the control's BeforeUpdate and AfterUpdate properties.
    • Check the control's OnKeyDown, OnKeyPress, OnKeyUp, and OnChange properties.
  • Saving a record:
    • Check the form's BeforeUpdate and AfterUpdate properties.
  • Moving to a new record:
    • Check the form's OnCurrent property.
Note: This is not a complete list of causes.

After 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.

  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 try to exit this control, you receive the error message mentioned in the SYMPTOMS section of this article.

↑ Back to the top


References

For more information about event properties, click Microsoft Access Help on the Help menu, type event properties in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

↑ Back to the top


Keywords: KB209582, kbprb, kberrmsg

↑ Back to the top

Article Info
Article ID : 209582
Revision : 2
Created on : 6/29/2004
Published on : 6/29/2004
Exists online : False
Views : 286