logo
search
Others

Fix Access Update Query Not Working When Run From Form

Muhammad TalhaMuhammad Talha Sep 28, 2026 870 views

Question details

An Access update query successfully updates records when run manually but fails to apply updates when triggered via a form that supplies the required parameters.

How to Fix Access Update Query Not Working When Run From a Form
Product
Microsoft Access
Device & OS
not provided
Scenario
Triggering a query from a user form to automatically update database records based on a provided purchase order number.
Observed behavior
The update query executes without errors but updates zero records when launched from the form, whereas manual execution works correctly.
Before you start

Before troubleshooting, confirm that the update query runs successfully when executed manually with hardcoded values, and ensure your database is in a trusted location so VBA and macros are fully enabled.

Solution 1Recommended

Verify Form References and Keep the Form Open

Ensure the query correctly references the form's exact control name and that the form remains open while the query executes.

When an update query relies on parameters from a form, the form must remain open and the control names must match perfectly. If the form closes before the query runs, Access cannot retrieve the criteria.

1
Check the parameter syntax

Open your update query in Design View. Check the criteria field to ensure the syntax exactly matches your form and control names (e.g., [Forms]![Serial Number Input]![Hou PO]).

2
Save the current record

Before running the query, force Access to save the data entered in the form. You can do this by adding the VBA command 'Me.Dirty = False' or using the 'SaveRecord' macro action.

3
Run from the Close event

If the form is meant to close after input, do not close it immediately. Instead, run the update query first, or move the query execution macro to the form's 'On Close' event.

Control Name Verification: Make sure you are referencing the Control Name and not just the field the control is bound to. You can find the exact Control Name in the Property Sheet under the 'Other' tab.
Free Microsoft Office alternative

Looking for a Lightweight Office Suite? Try WPS Office

While WPS Office does not include a direct database application like MS Access, it provides a powerful, free, and lightweight alternative for your daily document, spreadsheet, and presentation needs with seamless Microsoft Office compatibility.

  1. 1. Download the installer: Visit the official WPS Office website and download the free installer for your operating system.
  2. 2. Install the software: Run the setup file and follow the simple on-screen instructions to complete the installation.
  3. 3. Manage your data: Open WPS Spreadsheet to seamlessly import, analyze, and manage datasets exported from your database.
Fully compatible with Microsoft Excel (.xlsx), Word, and PowerPoint formatsFree and lightweight suite that uses minimal system resourcesFamiliar, tabbed user interface for seamless migration and quick learningManage and analyze exported database records efficiently using WPS Spreadsheet
QA img-9

Frequently Asked Questions

Why does my Access query prompt for a parameter value instead of reading it from the form?

This happens if the form is closed when the query runs, or if the form reference in the query criteria is misspelled. Double-check the spelling in the [Forms]![FormName]![ControlName] expression.

How do I reference a control located on a subform in my query?

To reference a subform control, you must include the subform container in the path. The correct syntax is: [Forms]![MainFormName]![SubformControlName].Form![ControlName].

Why does my update query say '0 records updated' when run from a form?

This usually indicates that the parameter passed from the form does not match any existing records, the data types are incompatible, or the data entered in the form hasn't been saved to the underlying table before the query runs.