Others

Microsoft Access: Reference and Filter a Subform

Rana GarciaRana Garcia Nov 20, 2026 869 views

Question details

The user wants to reference a subform on a tabbed main form and show records related to the selected parent record.

How to Reference and Filter a Subform in Microsoft Access
Product
Microsoft Access
Device & OS
not provided
Scenario
A main form contains a subform on a tab, and the subform should display records matching the current parent record.
Observed behavior
The goal is to use the correct subform reference and keep its records matched to the current parent record.
Before you start

Open the main form in Design View and identify the subform control name in its Property Sheet; it may differ from the name of the form it displays. Check the parent control and child field names and their data types before setting links or writing a filter.

Solution 1Recommended

Link the Subform to the Current Parent Record

Use linked fields when the subform should automatically show child records related to the current parent record.

1
Select the subform control

Open the main form in Design View, select the subform control on its tab, and open the Property Sheet. Confirm that the selected object is the subform control rather than a control inside the subform.

2
Set the linking fields

On the Property Sheet's Data tab, set Link Master Fields to the parent control or field, such as COD_PRODUCTO, and Link Child Fields to the corresponding field in the subform's record source.

3
Test the link

Save the form, open it in Form View, and move between parent records. The subform should update to show matching child records without an additional filter.

Link the Subform to the Current Parent Record
Check the relationship: The linked fields must contain corresponding values and have compatible data types. If the field names differ, enter the appropriate parent and child names in their respective properties.
Free Microsoft Office alternative

Work With Related Office Files in WPS Office

WPS Office is a free, lightweight alternative for everyday document and spreadsheet work. Its familiar interface and Microsoft Office format compatibility make it easy to move supported files between suites. It does not fix Access subform references or replace an Access database application.

Review spreadsheet exports from Access in WPS SpreadsheetOpen and edit compatible Microsoft Excel XLSX filesUse a familiar interface for common office tasksMove supported documents between WPS Office and Microsoft Office
microsoft office alternative - wps office

Frequently Asked Questions

Do I need a VBA filter if the subform is linked?

Usually not. Set Link Master Fields and Link Child Fields on the subform control's Data tab, then test navigation between parent records in Form View.

How do I find the name to use in a subform reference?

In the main form's Design View, select the subform control and check its Name on the Property Sheet. Use that control name before the Form property, even if the displayed form has a different name.

Does the tab name belong in the subform reference?

Normally, no. A subform control placed on a tab can be referenced from the main form as Me!SubformControlName.Form.

What changes if COD_PRODUCTO is a text field?

The filter expression must quote the text value and escape any embedded quote characters. The numeric example shown in the VBA solution should not be used unchanged for a text key.