Filter a Microsoft Access Subform with a Main Form Combo Box
Question details
Filter a datasheet subform according to a combo box selection on its main form.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A main form contains a combo box for selecting a seniority level, and its subform displays employee records.
- Observed behavior
- The goal is for the subform to show only employees matching the selected seniority level.
In Design view, check the combo box's bound value and the subform's record source to identify the matching field and its data type. Also note the name of the subform control on the main form; it may differ from the name of the form displayed inside it.
Link the subform to the combo box
Use linked fields when the combo box's bound value matches a field in the subform's record source.
In the Navigation Pane, right-click the main form and select Design View. Open the Property Sheet if it is not already visible.
Click the border of the subform on the main form, rather than a field inside the subform. On the Property Sheet, open the Data tab.
Set Link Master Fields to the combo box control name, such as cboSeniority, and Link Child Fields to the matching field in the subform record source, such as SeniorityLevel. The bound combo box value and child field must represent compatible values.
Save the form, switch to Form View, and choose a seniority level in the combo box. Check that the subform displays matching employees.

Apply a subform filter after the combo box changes
Use an After Update event when automatic linking is unsuitable or unavailable.
Work with employee lists in WPS Spreadsheets
WPS Office is a free, lightweight Office alternative with a familiar interface for working with spreadsheet employee lists. It supports common Microsoft Office formats for easier file migration, but it does not replace Access forms or fix Access subform settings.

Frequently Asked Questions
Why are Link Master Fields and Link Child Fields unavailable?
In Design View, select the subform control's border and check its Property Sheet > Data tab. Confirm that its Source Object is a form. If linking remains unavailable for the setup, apply a filter in the combo box's After Update event.
What if my combo box displays a seniority name but stores an ID?
Check the combo box's Bound Column property on the Property Sheet. Link or filter against the corresponding ID field in the subform's record source, rather than the displayed name.
How can I show all employees again?
With the VBA filter method, clear the combo box value. The example's After Update event turns FilterOn off when the value is Null.
Does the subform control name have to match the form name?
No. Select the subform control on the main form and check its Name property. Use that control name in an expression such as Me!EmployeesSubform.Form.




