ACC1x: GP Fault with Button Caption Text Longer Than 2048

ID: Q100154


The information in this article applies to:
  • Microsoft Access 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 : kberrmsg kbusage FmsHowto
Version : 1.0 1.1
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: March 24, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.