Others

Fix an Invalid Operation Error in an Access Left Join

Olivia MillerOlivia Miller Nov 27, 2026 869 views

Question details

Include exhibitors without a previous-year record in an Access query while avoiding an invalid operation error.

Fix an Invalid Operation Error in an Access Left Join
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.
Before you start

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.

Solution 1Recommended

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.

1
Create the exhibitor list

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.

2
Save the yearly totals queries

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.

3
Join the saved queries

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.

4
Run and check the results

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.

Use a unique exhibitor query as the base for left joins
Scope of the exhibitor list: The UNION list includes exhibitors from both shows, including previous-only exhibitors. If you need current-show exhibitors only, use a distinct list from the current show as the base instead.
Free Microsoft Office alternative

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.

Review exported exhibitor lists and yearly square-footage resultsOpen and edit Microsoft Excel formats such as XLSXUse a familiar spreadsheet interface for a smoother migrationWork with a free, lightweight Office alternative
microsoft office alternative - wps office

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.