Microsoft KB Archive/97533

{|
 * width="100%"|

PRA: GPF Declaring New Object Variable During Break Mode
'Article ID: Q97533

Creation Date: 13-APR-1993

Revision Date: 19-SEP-1996' The information in this article applies to:


 * Microsoft Access version 1.0

SYMPTOMS

When you declare a new object variable such as a form or table while your code is in break mode (when you are debugging your Access Basic code) and then recompile the code, a general protection (GP) fault occurs. The following are examples of object variable declarations:

Dim F as Form Dim T as Table STATUS

Microsoft has confirmed this to be a problem in Microsoft Access version 1.0. This problem was corrected in Microsoft Access version 1.1.

MORE INFORMATION

Steps to Reproduce Problem

  In a new or existing module, enter the following sample function: Function GP_Fault z=Forms!Form!X End Function  Save and then close the module.  Create a new form. In the form's OnOpen property, enter: "=GP_Fault" Save and then close the form. Open the form in Form view. You will receive the error message &quot;Invalid reference to form 'Form'&quot;. Choose OK.  The module will open and the line &quot;z=Forms!Form!X&quot; will be selected. Add the following lines below the selected line: Dim T as Form Set T = Forms![GPF]  From the Run menu, choose Compile All. Save and then close the module. When prompted to reset the halted code, choose OK.</li></ol>
 * }

-

"THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED &quot;AS IS&quot; 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." '' ©1997 Microsoft Corporation. All rights reserved. Legal Notices.

''

Additional reference words: 1.00 WinIss

KBCategory: kbenv

KBSubcategory: EvnGpf