ACC1x: Wrong RowSourceType for Combo Box Causes GP Fault

ID: Q94826


The information in this article applies to:


SYMPTOMS

If you set the RowSourceType for a combo box or list box to an invalid value, when you switch from Form Design view to Form Browse view, a general protection (GP) fault may occur.


CAUSE

Valid values for the RowSourceType property are Table/Query, Value List, and Field List. If RowSourceType is set to Table/Query, an SQL SELECT statement is a valid value for the RowSource property.

If a SQL statement is incorrectly entered into RowSourceType, a GP fault may occur. This problem may also occur if the RowSourceType information includes random characters.


RESOLUTION

Be sure that RowSouceType is set to a valid value: Table/Query, Value List, or Field List.


STATUS

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


MORE INFORMATION

Steps to Reproduce Problem


  1. In the sample database NWIND.MDB, create a new, unbound blank form, and place a combo box on the form.


  2. If RowSourceType is set to
    Select [employee id] from employees;

    when you switch from Form Design view to Form Browse view, a dialog box with the following text is displayed:
    'select [employee id] from employees;' isn't a valid setting for RowSourceType property.

    Choosing OK at this point would switch you to Form Browse view. (If you are using a list box, #Error is displayed in the list box.)


  3. If the WHERE clause [employee id] = 7 is added to the SQL statement in RowSourceType, the result is the same.

    If the WHERE clause is changed to [employee id] = forms!form10!xx, a GP fault occurs, and the following message is displayed:
    Application Error MSACCESS caused a General Protection Fault in module MSACCESS.EXE at 009A:09F6.

    NOTE: xx, as referred to in the WHERE clause, is not a control on the form.



REFERENCES

Microsoft Access "User's Guide," version 1.0, Chapter 9, "Designing Forms," pages 242-244

Additional query words:


Keywords          : kbusage FmsCmbo 
Version           : WINDOWS:1.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: March 14, 1999