ACC: Can't Find Macro Error Message
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 in 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 the event properties of either a form or a control, such as in the
OnCurrent or the AfterUpdate properties.
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.
- 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.
- 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.
- Saving a record:
- Check the form's BeforeUpdate or AfterUpdate property.
- Moving to a new record:
- Check the form's OnCurrent property (also see #3).
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 (or NWIND.MDB in
Microsoft Access 1.x or 2.0).
- Open the Employees form in Design view.
- Display the property sheet by clicking Properties on the View menu.
- Select the Last Name control and type a single space in the
AfterUpdate property.
- 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 in the "Symptoms" section of this article.
REFERENCES
For more information about event properties, search the Help Index for
"event properties," or ask the Microsoft Access 97 Office Assistant.
Keywords : kberrmsg FmsHowto
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: March 23, 1999