Filter a Microsoft Access Form Using a Table Field
Question details
Find the form's record source and filter by a table field that appears in a subform.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A user wants to search by Associates Name, the control source of a text box on a subform.
- Observed behavior
- The field on the subform is not directly available to the main form's filter.
Open the database in Access and identify whether you want to filter main-form records or only the records displayed in the subform. Note the text box's Control Source and the related tables' linking fields.
Include the Related Field in the Main Form's Record Source
Use this method when you want the main form to show records associated with a particular name.
Open the main form in Design View. Select the form using the square at the upper-left corner, open Property Sheet, and check Record Source on the Data tab.
In the Record Source property, click the builder button (...) to open Query Builder. Add the related table, join it to the main table using the appropriate key fields, and add Associates Name to the query grid. Save the query and return to the form.
On the form's Property Sheet, Data tab, enter a criterion such as [Associates Name] = 'Smith' in the Filter property. Use the field name, not the text box name txtAssociatesName. For a name containing an apostrophe, double it inside the quoted value, as in 'O''Brien'.
Set Filter On to Yes, then open the form in Form View and verify the results. If needed, use Home > Toggle Filter to apply or remove the filter.

Filter the Subform by Its Own Field
Use this method when you only need to limit the records displayed inside the subform, not the main-form records.
Work With Office Files in WPS Office
WPS Office is a free, lightweight alternative for working with documents, spreadsheets, and presentations. Its familiar interface and Microsoft Office format compatibility make moving everyday files easy. Access is still needed to configure Access form filters.

Frequently Asked Questions
Where can I find a form's Record Source in Access?
Open the form in Design View, select the form itself, and open Property Sheet. The Record Source property is on the Data tab.
Should I filter by txtAssociatesName or Associates Name?
Use the underlying field name in the form's filter, such as [Associates Name], provided that field is included in the form's record source. The text box name, such as txtAssociatesName, identifies the control.
Can a main form filter directly on a field that exists only in its subform?
No. Include the related field in the main form's record source or use a suitable query to identify matching main records. A subform control can supply a value, but that does not make its field part of the main form's record source.
Will filtering the subform also filter the main form?
No. A filter applied to the subform affects the records displayed in that subform. To limit main-form records, apply a filter or query to the main form's record source.




