ACC2: GP Fault Using Module.InsertText in Form Module

Last reviewed: May 14, 1997
Article ID: Q121276
The information in this article applies to:
  • Microsoft Access version 2.0

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

When you use an implicit reference to a module with the InsertText method in a form module, you may receive a general protection (GP) fault.

RESOLUTION

Use an explicit reference to the module when you are using the InsertText method in a form module. The following statement is an example of an explicit reference to a module:

   Forms![FormName].Module.InsertText Field0.Text

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access version 2.0. This behavior no longer occurs in Microsoft Access version 7.0.

MORE INFORMATION

Steps to Reproduce Problem

WARNING: Following the steps in this example will cause a GP fault on your computer. You should save and close any open files on your computer before following these steps.

  1. Start Microsoft Access and open the sample database NWIND.MDB.

  2. Create a blank, new form.

  3. Add a text box with the following property to the form:

          Name: Field0
    

  4. Set the text box's AfterUpdate property to the following event procedure:

          Sub Field0_AfterUpdate()
             Module.InsertText Field0.Text
          End Sub
    
    

  5. View the form in Form view.

  6. Type any text in the text box, and then press ENTER. Note that you receive a GP fault error message.

REFERENCES

For more information about InsertText, search on "InsertText" using the Microsoft Access Help menu.


Additional query words: gpf
Keywords : FmsEvnt kberrmsg kbusage
Version : 2.0
Platform : WINDOWS
Hardware : X86
Issue type : kbbug
Resolution Type : kbworkaround


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.

Last reviewed: May 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.