ACC: Event Procedure Disappears When a Control Is Renamed (113876)
The information in this article applies to:
- Microsoft Access 2.0
- Microsoft Access for Windows 95 7.0
- Microsoft Access 97
This article was previously published under Q113876
Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
Event procedure code does not run when you expect it to.
CAUSE
You changed the Name property of the control that has the event procedure
code. When you change a control's name by changing its Name property, the
event procedure code name, which is made up of the control name and the
event name, does not change to reflect the new control name.
This behavior is consistent with Microsoft Visual Basic behavior.
RESOLUTION
To restore the original event procedure, do either of the following:
- Copy the code from the original event procedure and paste it into
the new event procedure.
-or-
- Delete the new event procedure code, including the beginning Sub and
ending End Sub lines, and then rename the original event procedure to
the correct name for the control.
REFERENCES
For more information about creating event procedures, search the Help Index
for "event procedures," or ask the Microsoft Access 97 Office Assistant.
Modification Type: | Major | Last Reviewed: | 5/6/2003 |
---|
Keywords: | kbprb kbusage KB113876 |
---|
|