Others

Filter a Microsoft Access Report Using a Combo Box

Khadija KhanKhadija Khan Nov 22, 2026 868 views

Question details

Open a Microsoft Access report showing only records associated with the owner selected in a combo box.

Filter a Microsoft Access Report Using a Combo Box
Product
Microsoft Access
Device & OS
not provided
Scenario
A library navigation form contains an owner lookup combo box and a button to open the selected owner's items.
Observed behavior
The report opens with headings and controls, but the expected owner records do not appear.
Before you start

Identify the report name, its record source, and the field used to identify an owner. In the combo box's Property Sheet, check which column is bound and whether its value is a number or text.

Solution 1Recommended

Filter the report from the button's Click event

Use the selected combo box value as the report's WhereCondition instead of relying on a query parameter.

The filter field must be available in the report's record source, and its data type must match the combo box's bound value. A combo box can display an owner name while returning a numeric owner ID.

1
Check the report query

Open the report in Design View and check Property Sheet > Data > Record Source. Open the source query and confirm it returns the expected records and includes the owner field. Remove an owner-selection parameter if the button filter will supply that condition.

2
Check the combo box value

Open the Library Navigation form in Design View. Select OwnerNameLookupComboBox and check Property Sheet > Data > Row Source and Bound Column. Note whether the bound column returns an owner ID or an owner name.

3
Create the button event

Select the ViewOwnersItems button, open Property Sheet > Event, and set On Click to [Event Procedure]. Click the ellipsis button to open the VBA editor.

4
Add a numeric ID filter

If the bound value and report field are numeric owner IDs, add this code inside the button's Click procedure: If IsNull(Me.OwnerNameLookupComboBox.Value) Then MsgBox "Select an owner first." Exit Sub End If DoCmd.OpenReport "OwnersItemsReport", acViewPreview, , "[OwnerID]=" & Me.OwnerNameLookupComboBox.Value Replace OwnersItemsReport with the actual report name and OwnerID with the matching field in its record source.

5
Test the report

Save the form, open it in Form View, select an owner, and click ViewOwnersItems. If the report is still empty, open its record source query and verify that it contains rows matching the combo box's bound value.

Filter the report from the button's Click event
Filtering by a text name: If the bound value and report field are text instead of numeric, use a quoted text filter. For example, replace the OpenReport line with: DoCmd.OpenReport "OwnersItemsReport", acViewPreview, , "[OwnerName]='" & Replace(Me.OwnerNameLookupComboBox.Value, "'", "''") & "'". Replace OwnerName and the report name with the actual names.
Free Microsoft Office alternative

Review Exported Access Data in WPS Spreadsheet

WPS Office is a free, lightweight alternative with a familiar interface for working with Office files. Export Access data to a spreadsheet to review or share it in WPS; WPS does not fix Access report events or replace an Access database.

Filter exported owner and item data in WPS SpreadsheetOpen and edit Microsoft Excel XLSX filesUse familiar spreadsheet tools for an easier transitionWork with a free, lightweight Office alternative
microsoft office alternative - wps office

Frequently Asked Questions

Do I need a parameter in the report's query?

Not for the owner selection if DoCmd.OpenReport supplies the matching WhereCondition. Check the report's Record Source and remove the owner parameter from the query if it is no longer needed.

Why does the report open but show no records?

The combo box may return an ID while the filter compares it with a name, or the report query may not contain matching rows. Check the combo box's Bound Column and test the report's Record Source query.

How do I filter by an owner name instead of an ID?

Use a text field from the report's record source and enclose the selected value in quotes in the WhereCondition. Escape apostrophes in the value with Replace(value, "'", "''").

Can the report open as soon as I select an owner?

Yes. In the combo box's Property Sheet > Event, set After Update to [Event Procedure] and add the DoCmd.OpenReport filter code. Use the button's On Click event instead if you prefer a separate action.