Others

How to Reference Access Subform Controls in an Update Query

Amos GikundaAmos Gikunda Nov 3, 2026 869 views

Question details

The user needs to use values from a subform's controls as criteria in an MS Access update query to adjust available inventory.

How to Reference Access Subform Controls in an Update Query
Product
Microsoft Access
Device & OS
not provided
Scenario
Updating an inventory database where entering a reservation on a subform should trigger an update query to automatically reduce the available capacity by one.
Observed behavior
The update query fails to recognize the controls on the subform, causing Access to incorrectly prompt the user for parameter values or update unrelated records.
Before you start

Verify the exact names of your main form, the subform control on your main form (which can differ from the subform's actual object name), and the specific fields you want to reference.

Solution 1Recommended

Use the Fully Qualified Form and Subform Control Reference

The most common reason for parameter prompts is an incorrect reference path. You must specify the full, fully-qualified path through the main form to the subform control.

Microsoft Access requires a very specific syntax to locate a control inside a subform. If you omit the '.Form' property or reference the wrong container, the query engine treats the criteria as an unknown parameter.

1
Open Query Design

Right-click your update query in the navigation pane and select 'Design View'.

2
Locate the Criteria Row

Navigate to the column of the field you want to filter (for example, 'SailDate' or 'Product').

3
Enter the Fully Qualified Path

In the Criteria row, enter the syntax exactly as follows: [Forms]![MainFormName]![SubformControlName].[Form]![ControlName]

4
Apply Actual Object Names

Replace the placeholders with your actual names. For example: [Forms]![MainForm]![SubformControl].[Form]![SailDate].

5
Save and Test

Save the query, ensure your main form is open and populated with data, and run the update query to verify it executes without prompting for parameters.

Use the Fully Qualified Form and Subform Control Reference
Subform Control vs. Subform Name: The 'SubformControlName' refers to the name of the control box on the main form that houses the subform, which might not be the same as the name of the subform object saved in your database pane.
Free Microsoft Office alternative

Simplify Inventory Management with WPS Office

While Microsoft Access requires complex queries, VBA, and precise control referencing for inventory management, many users find that spreadsheet-based systems are far more intuitive. WPS Office offers a powerful, free alternative to Microsoft Office that easily handles inventory and reservations using straightforward spreadsheet formulas.

  1. 1. Install WPS Office: Download and install the free suite to access WPS Spreadsheet on your device.
  2. 2. Set Up Your Inventory Tracker: Create a new spreadsheet and list your capacities, sailing dates, and incoming reservations.
  3. 3. Automate Calculations: Use built-in formulas to subtract booked reservations from your total capacity dynamically without writing any macros.
100% compatible with Microsoft Excel (.xlsx, .xls) file formats and functionsCalculate available inventory instantly using built-in spreadsheet formulas like SUMIFSLightweight, completely free, and avoids the steep learning curve of relational database queriesFamiliar user interface makes data entry and reservation tracking simple and intuitive
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Access update query ask for parameters when triggered from a subform?

This usually happens because the query cannot find the control you referenced. It occurs if the main form is currently closed, if the control name is misspelled, or if the reference syntax is incorrect (such as forgetting the '.Form' property in the subform path).

What is the difference between an Access subform and a subform control?

The subform is the actual form object saved in your database navigation pane. The subform control is the 'box' container on your main form that displays the subform. References in queries must use the name of the subform control container, not necessarily the subform object itself.

Can I use VBA instead of a macro to run an update query based on subform data?

Yes, using VBA commands like DoCmd.RunSQL or CurrentDb.Execute gives you much more control over the update process. Using VBA allows you to build the SQL string dynamically, directly inserting the form's control values into the SQL statement rather than relying on parameter references.