ACC1x: GP Fault Referencing Column Property of Combo Box

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

SYMPTOMS

The following messages will appear when you are trying to reference the Column property of a combo box in Datasheet view:

  • An error has occurred in your application. If you choose Ignore, you should save your work in a new file. If you choose Close, your application will terminate
  • Application Error: Microsoft Access caused a General Protection Fault in module MSAIN110.DLL

CAUSE

The general protection (GP) fault will occur under the following conditions:

  • The combo box has a query or table as the RowSource.
  • The form must be opened directly into Datasheet view.
  • A selection has been made in the combo box.
  • The Column property of the combo box is referenced in an expression.

RESOLUTION

The following methods can be used to work around the problem:

Method 1

If the form will only be used in Datasheet view, use a list box instead of a combo box. A list box is functionally equivalent to a combo box in Datasheet view.

Method 2

If the form will be used in both Datasheet view and Form view, make sure the form is opened in Form view first. The following macro can be used to open the form in Form view, then in Datasheet view:

   Action    Described Below
   -------------------------

   Echo            1
   OpenForm        2
   OpenForm        3
   Echo            4

   Macro Actions
   -------------

   1. Echo
         Echo On: No
   2. OpenForm
         Form Name: MyForm
         View: Form
   3. OpenForm
         Form Name: <your form name here>
         View: Datasheet
   4. Echo
         Echo On: Yes

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

  1. Open the sample database NWIND.MDB in Microsoft Access version 1.1.

  2. Create a blank, unbound, form with the following form properties:

          DefaultView: Datasheet
    

  3. Create a combo box on the form with the following properties:

          ControlName: MyCombo
          RowSourceType: Table/Query
          RowSource: Employees
          ColumnCount: 2
    

  4. Close and save the form with the name "MyForm".

  5. Open the form from the Database window and make a selection in the combo box.

  6. With the form left open, create a new module.

  7. From the View menu, choose Immediate window.

  8. Type the following, and then press ENTER:

          ? Forms!MyForm!MyCombo.Column(1)
    


Additional query words: combo box list box GPF
Keywords : FmsHowto kbusage
Version : 1.1
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.