Filter a Microsoft Access Report Using a Combo Box
Question details
Open a Microsoft Access report showing only records associated with the owner selected in 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.
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.
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.
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.
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.
Select the ViewOwnersItems button, open Property Sheet > Event, and set On Click to [Event Procedure]. Click the ellipsis button to open the VBA editor.
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.
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.

Open the filtered report when the combo box changes
Use the combo box's After Update event if the report should open immediately after an owner is selected.
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.

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.




