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