How to Pass a Value from a Nested Access Subform to a Popup Form
Question details
The user needs to retrieve a specific field value (such as USER_ID) from a nested Microsoft Access subform and pass it to a separately opened popup form to be used as a default value.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Operating a multi-layered form structure where a standalone popup form needs to initialize using data extracted from a deeply nested subform control.
- Observed behavior
- Correctly referencing the nested data requires explicitly calling each subform control's name and utilizing their Form properties to successfully pass the data into the popup's Open event.
Verify the exact names of your subform controls on the parent forms by checking their Property Sheets, as control names often differ from the names of the source forms themselves.
Set the Default Value in the Popup Form's Open Event using VBA
Use Visual Basic for Applications (VBA) to dynamically pull the nested subform value into the popup form when it initializes.
A popup form operates independently of the calling form. To fetch a value from a nested subform, you must build a complete reference string chaining the parent forms and their respective subform controls using the .Form property.
When setting a Default Value programmatically for text fields, ensure the passed value is properly wrapped in quotation marks.
Right-click your target popup form in the Access Navigation Pane and select Design View from the context menu.
Press F4 to open the Property Sheet. Click on the Event tab, find the 'On Open' property, select [Event Procedure] from the dropdown, and click the ellipsis (...) button to open the VBA editor.
In the VBA editor, enter the following code (replace the placeholder names with your actual control names): Me.txtUser_ID.DefaultValue = """" & [Forms]![Form A]![Subform B].Form![Subform C].Form![USER_ID] & """"
Click the Save icon in the VBA editor, close it, and switch your Access application to Form View. Trigger the popup to verify the default value populates correctly.

Pass the Value Directly via the Control Source Property
Set the default value property directly on the popup's text box without writing VBA code.
Looking for a Lightweight, Reliable Office Alternative?
While Microsoft Access is a powerful tool for complex relational databases, WPS Office provides an excellent free, lightweight alternative for managing standard data sets, spreadsheets, and documents. With a familiar UI and broad compatibility, it easily handles your daily office workflows.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install the Software: Run the installer and follow the quick on-screen instructions to complete the setup in minutes.
- 3. Open Your Data Files: Launch WPS Spreadsheet to seamlessly open, manage, and edit your existing Microsoft Excel and CSV database exports.

Frequently Asked Questions
Why do I get a '#Name?' error when referencing a nested subform?
This error usually occurs if you use the name of the source form instead of the name of the subform control embedded on the parent form. Always check the subform control's 'Name' property in the Property Sheet.
Do I absolutely need to use the '.Form' property in my reference string?
Yes. The '.Form' property is strictly required because it tells Microsoft Access that you are referring to the actual form object contained within the subform control, rather than the container control itself.
Can I pass a value to the popup if the main form containing the subform is closed?
No. The main form containing the nested subforms must remain open (it can be hidden, but not closed) for the popup form to successfully read the reference path and extract the value.




