Fix Microsoft Access Subqueries That Return Multiple Records
Question details
Identify and correct the subquery that returns multiple records where Microsoft Access expects one value.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A query built from Qry_preSQC contains multiple subqueries, some correlated by Case_number and SQC.
- Observed behavior
- Access reports that at most one record can be returned by a subquery because at least one subquery returns multiple records.
Open the query in Access and review its SQL in View > SQL View. Identify the subqueries and note how their Case_number and SQC criteria relate to Qry_preSQC.
Identify the subquery returning multiple records
Use this approach to isolate the offending subquery in a query containing many subqueries.
In the Navigation Pane, right-click the query, select Design View, and choose View > SQL View.
Remove subqueries from the SELECT list one at a time and run the query after each change. Alternatively, start with Qry_preSQC and add subqueries one at a time until the error appears.
Create a separate select query using the source and conditions from the suspect subquery. Replace outer-query references with representative Case_number and SQC values, then run it to see whether multiple records match.

Make the subquery return one value
After identifying the subquery, choose a correction that matches the data and the intended result.
Use WPS Office for Everyday Office Documents
WPS Office is a free, lightweight alternative for working with documents, spreadsheets, and presentations. Its familiar interface and Microsoft Office format compatibility make it easy to move everyday files between suites. It does not fix Microsoft Access queries or replace Access databases.

Frequently Asked Questions
Why does Access say a subquery can return at most one record?
The subquery is being used where Access expects a single value, but its conditions match multiple records. Open the query in View > SQL View and inspect the subqueries and their WHERE clauses.
How can I find the faulty subquery when there are many?
In SQL View, remove subqueries one at a time and run the query after each change. Alternatively, start with Qry_preSQC and add them back one at a time until the error appears.
Do Case_number and SQC always identify one record?
Not necessarily. Run a separate select query with the relevant Case_number and SQC criteria to check how many records match. Add a further unique criterion if the intended record requires one.
Should I use MAX to fix the error?
Use MAX only if the highest matching value is the result you actually need. If each matching record is meaningful, consider a join or a separate query instead.
Can WPS Office repair an Access subquery?
No. Correct the query in Microsoft Access. WPS Spreadsheets can help you review tabular data exported to a compatible spreadsheet format, but it does not repair Access database queries.




