Fix a Microsoft Access LEFT JOIN That Omits Customers
Question details
The user needs an Access query that lists every customer alongside matching orders for a requested product.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A customer table is left-joined to an orders table, and the query should retain customers who have no order for the requested product.
- Observed behavior
- A WHERE condition on the orders table removes customers without a matching order from the results.
Check the customer ID and product field names in your tables, and replace the example names in the SQL if yours differ. Confirm that the customer ID fields in both tables have compatible data types.
Join Customers to a Saved Query of Filtered Orders
Filter the orders first, then left-join the filtered results to retain every customer.
A WHERE condition such as Orders.ItemOrdered = "Strawberry" is evaluated after the join. It removes rows where the order fields are Null, so customers without a match disappear.
Using a saved query as the right side of the join applies the product filter before the join and avoids relying on an additional ON-clause condition that Access may not accept.
In Access, select Create > Query Design, switch to SQL View, and enter: SELECT CustomerID, ItemOrdered FROM Orders WHERE ItemOrdered = "Strawberry";
Save the query as qStrawberryOrders. Replace the table, field, and product names in the SQL if they differ in your database.
Create another query, switch to SQL View, and enter: SELECT c.CustomerName, o.ItemOrdered FROM Customers AS c LEFT JOIN qStrawberryOrders AS o ON c.CustomerID = o.CustomerID;
Select Run. Every customer should appear; ItemOrdered will be Null when that customer has no Strawberry order.

Review Access Query Exports in WPS Spreadsheets
WPS Office is a free, lightweight Office alternative with a familiar interface for opening and reviewing exported query results. It does not fix or run Microsoft Access database queries, but its format compatibility makes it easy to move spreadsheet data between Office apps.

Frequently Asked Questions
Why does a WHERE condition change my LEFT JOIN results?
A condition such as WHERE Orders.ItemOrdered = "Strawberry" excludes rows where ItemOrdered is Null. Those Null values represent customers without a matching order, so the condition removes them after the join.
Can I add OR Orders.ItemOrdered IS NULL to the WHERE clause?
That keeps customers with no orders at all, but it can still omit customers who have orders only for other products. Filter the orders before the join to retain those customers too.
Why does a customer appear multiple times?
A LEFT JOIN returns a row for each matching order. If a customer has several Strawberry orders, each matching order produces a separate row.
How can I show each customer only once?
Base the query on Customers and use EXISTS or NOT EXISTS to test for matching orders rather than joining individual order rows. Include the customer ID when identifying customers, since names may not be unique.
Can WPS Office run the Access query?
No. Run or edit the query in Microsoft Access. You can export its results to XLSX or CSV and open them in WPS Spreadsheets for review.




