ACC1x: Creating Unbound Object Frame with CreateControl()Last reviewed: June 8, 1997Article ID: Q104711 |
The information in this article applies to:
SYMPTOMSWhen you use the CreateControl() function with a controltype argument of 114 to create an unbound object frame, Microsoft Access causes a general protection (GP) fault when you view the form in Form view.
CAUSEThe CreateControl() function does not provide any method for specifying the object to embed in the new control. Instead, an empty, unbound object frame is created. Note that you cannot create an empty, unbound object frame when you create the frame manually because Microsoft Access displays an Insert Object dialog box in which you must select the object to embed.
RESOLUTIONThe GP fault occurs because Microsoft Access does not expect to run with an empty, unbound object frame. The CreateControl() function does not provide any method of specifying the object to embed. The following example demonstrates how to use the sample function CreateUnboundObjectFrame() to create an unbound object frame using a DoMenuItem action: NOTE: In the following sample code, an underscore (_) is used as a line- continuation character. Remove the underscore when re-creating this code in Access Basic.
STATUSMicrosoft has confirmed this to be a problem in Microsoft Access versions 1.0 and 1.1. This problem no longer occurs in Microsoft Access version 2.0.
MORE INFORMATION
Steps to Reproduce Problem
MSACCESS caused a General Protection Fault in module MSACCESS.EXE at 0096:50B6. REFERENCESMicrosoft Access "The Secrets of AccessWizards," pages 12-14 Microsoft Access "Language Reference," pages 151-152 and 433-434
|
Additional query words: ADK GPF
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |