Others

Reference a Subform Field in a Microsoft Access Navigation Form

Elise WilliamsElise Williams Nov 25, 2026 868 views

Question details

Reference a control in an Access subform and preserve the selected record when moving to a related form.

Reference a Subform Field in an Access Navigation Form
Product
Microsoft Access
Device & OS
not provided
Scenario
A navigation form switches between related forms, and the destination form needs to display the record selected in the first form.
Observed behavior
The user needs a subform control reference and a way to pass the selected record ID between forms.
Before you start

Open the navigation form in Design View and check the subform control's Name on its Property Sheet. Confirm that both related forms have a matching record ID field; the filtering example below assumes a numeric ID.

Solution 1Recommended

Reference the subform control and pass the selected record ID

Use the subform control's Form property to access its controls, then store the selected ID in a TempVar before the navigation form switches pages.

An Access navigation form typically uses a subform control whose SourceObject changes as users select navigation buttons. Store the record ID before switching to the destination form.

1
Find the subform control name

In the navigation form's Design View, select the subform control and open Property Sheet > Other. Note its Name; it may differ from the name of the form displayed inside it.

2
Reference a control inside the subform

In VBA, use Forms!YourParentForm!NameOfYourSubformControl.Form!SomeControlName. Replace each name with the actual parent form, subform control, and control names. The .Form property retrieves the form contained in the subform control.

3
Store the current record ID

Open the source form in Design View, select its Property Sheet > Event > On Current, and choose Event Procedure. In the VBA editor, use the following code, replacing ID with the bound ID control name: Private Sub Form_Current() On Error Resume Next TempVars.Remove "SelectedID" On Error GoTo 0 If Not IsNull(Me!ID) Then TempVars.Add "SelectedID", Me!ID End If End Sub

4
Filter the destination form

In the destination form's Property Sheet > Event > On Load, choose Event Procedure. For a numeric ID, use this code after a record has been selected on the source form: Private Sub Form_Load() Me.Filter = "ID=" & TempVars("SelectedID").Value Me.FilterOn = True End Sub Replace ID with the destination form's matching field name.

5
Test navigation

Open the navigation form in Form View, select a source record with a non-null ID, and click the destination navigation button. Check that the destination displays the matching record.

Reference the subform control and pass the selected record ID
Check the destination and ID type: The Load example requires SelectedID to exist; add handling for cases where the destination opens without a source selection. Text IDs need quoted and escaped filter values. If the destination displays the records in another subform, apply the filter to that subform's Form object instead.
Free Microsoft Office alternative

Work with exported Access data in WPS Spreadsheets

WPS Office is a free, lightweight alternative with a familiar interface for working with office documents. Export Access data to an Excel file to move it into WPS Spreadsheets; WPS does not run Access navigation forms or VBA database logic.

Review and filter data exported from Access in a spreadsheetOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interface for an easier transitionWork with a lightweight office suite at no cost
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Access subform reference use .Form?

The subform control is a container. Its .Form property returns the form inside it, allowing a reference such as Forms!ParentForm!SubformControl.Form!ControlName.

Is the subform control name the same as the form name?

Not always. Select the subform control in the parent form's Design View and check Property Sheet > Other > Name. Use that name in the reference.

How can I pass a selected record to another navigation page?

Store the source form's ID in a TempVar before switching pages, then set the destination form's Filter and FilterOn properties in its On Load event. Ensure the destination is not opened without a stored ID, or handle that case in code.

What if the destination record is inside another subform?

Reference the destination's subform control and its .Form property, then set that form object's Filter and FilterOn properties. Check the subform control name in Design View first.

Can WPS Office run my Access navigation form?

No. Keep the navigation form and its VBA logic in Microsoft Access. To work with the underlying data in WPS Spreadsheets, export it from Access to an Excel file and open that file in WPS.