PRB: OLE Event Procedure Listed Under "General" in Object BoxArticle ID: Q132021Creation Date: 26-JUN-1995 Revision Date: 05-FEB-1996
The information in this article applies to:
SYMPTOMS
Novice: Requires knowledge of the user interface on single-user computers.
In the Module window, when you use the Object box to display an OLE control
event procedure, the name of the custom control is listed in the Object box
under "general" rather than under the name of the custom control.
CAUSE
The OLE control Name property has too many characters.
STATUS
This behavior no longer occurs in Microsoft Access for Windows 95
version 7.0.
RESOLUTION
Limit the Name property of custom controls to 20 or fewer characters.
NOTE: You can copy and paste the code that you created for the truncated
custom control's event procedure from the "general" section to the new
custom control.
MORE INFORMATION
When Microsoft Access creates event procedures, it combines the name of the
control and the event procedure, separated by the underscore character. If
the control name is longer than 20 characters, Microsoft Access truncates
the control name portion of the Sub declaration to 20 characters.
The situation occurs only if you use the short-cut method (click the
object, click the right mouse button, and then click Build Event) to open
the Module window.
Microsoft Access initially creates the event procedure using the full name
of the control. If the control name is longer than 20 characters, Microsoft
Access truncates the control, creating a new event procedure. Microsoft
Access places the original event procedure under "general" in the Object
box. Any code entered in the event procedure is contained in the event
procedure in the "general" section. The new, truncated event procedure is
empty.
Steps to Reproduce Behavior |
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.