Fix an Invalid Operation Error in an Access Left Join
Question details
Include exhibitors without a previous-year record in an Access query while avoiding an invalid operation error.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- The user wants to compare exhibitor square footage for the current and previous shows.
- Observed behavior
- A left outer join can produce an invalid operation error when it directly joins complex or calculated subqueries.
Identify the exhibitor key and the queries that calculate square footage for each show. Check that the matching key fields have compatible data types and that each yearly totals query returns one row per exhibitor.
Use a unique exhibitor query as the base for left joins
Use this approach to include exhibitors from either show and keep those without matching yearly totals.
In Access, select Create > Query Design, switch to SQL View, and enter a UNION query such as: SELECT ExhibitorID FROM CurrentShow UNION SELECT ExhibitorID FROM PreviousShow; Replace the table and field names with your own, then save the query as ExhibitorList. UNION removes duplicate exhibitor IDs.
Use Create > Query Design to create or check separate queries for the current and previous shows. Include ExhibitorID and the calculated square footage in each, with one totals row per exhibitor, and save them as CurrentYearTotals and PreviousYearTotals.
Create another query in SQL View and use ExhibitorList as the left side of both joins: SELECT e.ExhibitorID, c.SquareFootage AS CurrentSqFt, p.SquareFootage AS PreviousSqFt FROM (ExhibitorList AS e LEFT JOIN CurrentYearTotals AS c ON e.ExhibitorID = c.ExhibitorID) LEFT JOIN PreviousYearTotals AS p ON e.ExhibitorID = p.ExhibitorID; Replace the field and query names as needed.
Select Run in Query Design and verify that exhibitors with no previous-year match still appear. Their PreviousSqFt value will be Null unless you explicitly replace it.

Review exhibitor data with WPS Spreadsheets
WPS Office is a free, lightweight alternative for working with Office documents. Its familiar interface and format compatibility make it easy to move exported Access results into a spreadsheet, although it does not fix Access query errors.

Frequently Asked Questions
Why does the exhibitor list use UNION instead of UNION ALL?
UNION removes duplicate exhibitor IDs, producing one list of unique exhibitors across the two shows. UNION ALL retains duplicates, which can cause repeated rows in the final join.
How can I include only current-show exhibitors?
Create a saved query with SELECT DISTINCT ExhibitorID FROM CurrentShow, using your actual table and field names. Use that query as the left-side base instead of the two-show UNION query.
Why is previous-year square footage blank for some exhibitors?
A left join returns Null for fields on the right when there is no matching row. If you want to display zero instead, add an expression such as Nz([PreviousSqFt], 0) to an appropriate Access query.
What should I check if the saved-query joins still fail?
Open each saved query separately and confirm it runs, returns the expected exhibitor key, and uses a compatible key data type. Simplifying the calculations or storing intermediate results in tables may help isolate an unsupported join or expression.




