Others

How to Use Access Combo Boxes as Query Criteria

Chanuka GeekiyanageChanuka Geekiyanage Oct 26, 2026 868 views

Question details

The user wants to use combo boxes on an Access form to select players for a query, passing player IDs as criteria instead of typing names manually to avoid errors.

How to Use Access Combo Boxes as Query Criteria
Product
Microsoft Access
Device & OS
not provided
Scenario
Filtering query results using form controls while ensuring data normalization and avoiding manual data entry errors.
Observed behavior
The current query requires manual typing of player names, which causes spelling errors and fails to utilize relational foreign keys efficiently.
Before you start

Ensure you have your primary tables (e.g., Players) created with proper Primary Keys and your destination query ready before modifying the form controls.

Solution 1Recommended

Configure Combo Boxes to Pass IDs as Query Criteria

Set up the combo box properties to hide the ID column while displaying the name, then reference the combo box directly in the query criteria.

To avoid manual typing errors and maintain database normalization, forms should display user-friendly names while passing standard ID numbers (foreign keys) to queries. This is achieved by adjusting the column widths and bound column properties of the combo box.

1
Set the Row Source

Open your form in Design View, select the combo box, and navigate to the Property Sheet. Set the 'Row Source' to select both the ID and the Name, for example: SELECT PlayerID, PlayerName FROM Players ORDER BY PlayerName;

2
Adjust Format Properties

In the Format tab of the Property Sheet, set Column Count to 2 and Column Widths to 0";1". This hides the first column (PlayerID) and displays the second column (PlayerName).

3
Set the Bound Column

In the Data tab of the Property Sheet, set the Bound Column to 1. This ensures that when a user selects a name, the combo box actually stores and passes the hidden PlayerID.

4
Reference Combo Box in Query

Open your target Query in Design View. In the Criteria row under your Foreign Key field (e.g., PlayerID), enter the reference to your combo box: [Forms]![YourFormName]![YourComboBoxName].

5
Test the Query

Save both the form and the query. Open the form in Form View, select a player from the combo box, and run the query (often via a command button on the form) to verify it filters correctly.

Configure Combo Boxes to Pass IDs as Query Criteria
Data Normalization: By storing the ID rather than the text string, you optimize query performance and maintain strong data integrity across your relational tables.
Free Microsoft Office alternative

Need a Free Microsoft Office Alternative? Try WPS Office

While Microsoft Access is a specialized database tool, many complex data management, filtering, and reporting tasks can be seamlessly handled using WPS Spreadsheet. WPS Office is a lightweight, full-featured suite that provides excellent compatibility with Microsoft Office formats without the heavy subscription costs.

Fully compatible with Microsoft Excel, Word, and PowerPoint formats (.xlsx, .docx, .pptx).Manage, filter, and query datasets effortlessly using advanced Spreadsheet formulas and pivot tables.Free to download and lightweight, ensuring smooth performance on any device.Familiar user interface makes transitioning from other Office suites seamless.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my query prompt for a parameter when I run it?

This typically happens if the form name or combo box name is misspelled in the query criteria, or if the form is closed when the query executes. Ensure the form remains open and the reference [Forms]![FormName]![ControlName] matches your design exactly.

How do I make the combo box show the name instead of the ID?

In the combo box Property Sheet, set the Column Count to 2 and the Column Widths to 0";1". Setting the first column's width to 0 inches effectively hides the ID, displaying only the second column (the name) to the user.

Can I use multiple combo boxes to filter the same query?

Yes. You can reference multiple combo boxes in different columns of your query design grid. Just add the specific [Forms]![FormName]![ControlName] reference to the criteria row of each respective field you want to filter.