Fix Microsoft Access Changing Form References in Query Criteria
Question details
Prevent Access from replacing a form reference in saved query criteria with a reference to another form.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A saved query uses a form control reference such as [Forms]![ContactForm]![CompanyID] as a criterion.
- Observed behavior
- Access changes the reference to another form, sometimes the first form alphabetically, and the change returns after the query is corrected.
Open the affected database and identify the saved query and form control used in its criteria. Note the intended form and control names so you can restore the reference after changing the setting.
Disable Perform Name AutoCorrect and restore the query reference
Use this approach first when Access repeatedly changes object references in a saved query.
In Access, select File > Options > Current Database.
Under Name AutoCorrect Options, clear Perform name AutoCorrect, then select OK.
Open the affected query in Design View or SQL View. Replace the incorrect criterion with the intended reference, such as [Forms]![ContactForm]![CompanyID], and save the query.
Open ContactForm, select a CompanyID value, and run the query. Reopen the query in Design View or SQL View to check that its reference remains correct.

Build the form's RecordSource SQL in VBA
Use this workaround if the saved query reference continues to change after Name AutoCorrect is disabled.
Work with Office documents in WPS Office
WPS Office is a free, lightweight alternative for everyday document, spreadsheet, and presentation work. Its familiar interface and Microsoft Office format compatibility make moving common files straightforward. It does not fix Access database or query issues.

Frequently Asked Questions
Where is Perform name AutoCorrect in Access?
Open the database and select File > Options > Current Database. Find Name AutoCorrect Options and clear Perform name AutoCorrect.
Will disabling Name AutoCorrect restore my original query criterion?
No. Open the query in Design View or SQL View and manually restore the intended form and control reference, then save the query.
How can I check whether the corrected form reference works?
Open the referenced form, select a value in the referenced control, and run the saved query. Then reopen the query in Design View or SQL View to confirm the reference has not changed.
What can I try if Access still changes the saved query reference?
Build the SQL in the filter combo box's After Update event and assign it to the form's RecordSource property. Adapt the SQL and control names to the database, including the correct handling for numeric or text values.
Can WPS Office fix an Access query or replace Access?
No. WPS Office can work with common Word, Excel, and PowerPoint files, but the Access query and Name AutoCorrect settings must be managed in Microsoft Access.




