Microsoft KB Archive/208893

= ACC2000: LimitToList Property Is Enforced When the First Visible Column Is Not Bound =

Article ID: 208893

Article Last Modified on 7/15/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



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.



Steps to Reproduce Behavior
 Start Microsoft Access and open the sample database Northwind.mdb. 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

 Save the query as Test Query1. Create a new form not based on any table or query. 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.</li></ol>

<div class="references_section">