ACC1x: GP Fault with Button Caption Text Longer Than 2048

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

SYMPTOMS

You receive the following error message:

   Application Error - MSACCESS caused a General Protection Fault
   in module MSACCESS.EXE at 0058:40DC.

CAUSE

You may have set the caption of a command button to a text string that is longer than 2048 characters.

RESOLUTION

Caption length is limited to 2048 characters. Using Access Basic to set the caption to a value larger than 2048 characters can result in unexpected behaviors, such as the error message described above.

STATUS

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

MORE INFORMATION

Steps to Reproduce Problem

The following steps generate the error message described above:

  1. Add the following code to an Access Basic module:

          Function mod_CreateForm ()
    
             Dim F As Form
             Dim C As Control
    
             Set F = CreateForm("", "")
             Set C = CreateControl(F.FormName, 104, 0, "", "", 100, 100)
             C.Caption = String$(3000, "M")
          End Function
    
    

  2. Run the code by typing the following in the Immediate window:

          ?mod_CreateForm()
    

    Note that an icon for the form is created.

  3. Restore the form and set the focus to the command button. Click on the button as if you planned to change the text in the caption.

  4. Try to switch from Design view to Form view. The error message described above is displayed.


Additional query words: caption text string GPF GP fault
Keywords : FmsHowto kberrmsg kbusage
Version : 1.0 1.1
Platform : WINDOWS
Hardware : X86
Issue type : kbbug
Resolution Type : Info_Provided


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.