Article ID: 264791
Article Last Modified on 6/28/2004
APPLIES TO
- Microsoft Access 2000 Standard Edition
This article was previously published under Q264791
Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access project (.adp).
SYMPTOMS
In an Access project, when you run a filter by form that has a combo box, after you select an item from the combo box and apply the filter, you receive the following error messages:
CAUSE
The filter is not applying the bound column of the combo box. Access needs the bound column to look up the matching records.
RESOLUTION
Instead of running a filter by form that has a combo box, create a form that emulates query-by-form by implementing custom Visual Basic for Applications code. For additional information about emulating query-by-form, click the article number below to view the article in the Microsoft Knowledge Base:
235359 ACC2000: Implementing Query-by-Form in an Access Project
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
MORE INFORMATION
Steps to Reproduce the Behavior
- Create a new Access project that is based on the Northwind database from Microsoft SQL Server 2000.
- Create a new form that is based on the EmployeeTerritories table.
Add a combo box to the form, and then set the following properties:
ControlSource: EmployeeID RowSource: "SELECT EmployeeID, LastName FROM Employees" Bound Column: 1 Column Count: 2 Column Width: 0";1"
- Add TerritoryID to the form.
- View the form in Form view.
- On the Records menu, point to Filter, and then click Filter by Form.
- Note that the entries in the list for EmployeeID are listed with the last names as expected.
- Select Dodsworth from the EmployeeID combo box, and then on the Records menu, point to Filter, and click Apply Filter. Note that you receive the following error:
When you click OK, you receive another error:
Click Yes to build the filter. - View the form in Design view.
- On the View menu, click Properties. In the property sheet for the form, click to the Data tab. Note that the Filter property of the form is set to:
((EmployeeID="Dodsworth"))
You would expect the filter to be set to:
((EmployeeID=9))
Additional query words: pra ComboBox didn t
Keywords: kberrmsg kbbug kbpending KB264791