ACC2000: LimitToList Property Is Enforced When the First Visible Column Is Not Bound (208893)



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q208893
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies only to a Microsoft Access database (.mdb).

SYMPTOMS

When you attempt to set the LimitToList property of a combo box to No, you may receive the following error message:
Microsoft Access can't set the LimitToList property to No right now.

The first visible column, which is determined by the ColumnWidths property isn't equal to the bound column.

Adjust the ColumnWidths property first, and then set the LimitToList property.

CAUSE

If you set the combo box's BoundColumn property to any column other than the first visible column (or if you set BoundColumn to 0), the LimitToList property is automatically set to Yes.

RESOLUTION

To allow unique entries in a combo box, make the first visible column in the combo box the bound column.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start Microsoft Access and open the sample database Northwind.mdb.
  2. Create a new query and select Design View in the New Query dialog box. Add the Products table, and then add the following fields to the QBE grid:

    Field: ProductName
    Show: True

    Field: ProductID
    Show: True

  3. Save the query as Test Query1.
  4. Create a new form not based on any table or query.
  5. Add a combo box with the following properties to the form:

    RowSourceType: Table/Query
    RowSource: Test Query1
    ColumnCount: 2
    BoundColumn: 2
    ColumnWidths: 2";1"
    LimitToList: No

    Note that you receive the error message as soon as you attempt to set the LimitToList property to No. If you set the ColumnWidths property to 0";1", you can then set the LimitToList property to No because the first visible column is the bound column. However, if you subsequently change the width of the first column in the combo box to anything other than zero, the LimitToList property automatically changes to Yes.

REFERENCES

For more information about the LimitToList property, click Microsoft Access Help on the Help menu, type limittolist property in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

Modification Type:MinorLast Reviewed:7/15/2004
Keywords:kberrmsg kbprb KB208893