Others

Fix a Microsoft Access LEFT JOIN That Omits Customers

Anum MushtaqAnum Mushtaq Nov 25, 2026 869 views

Question details

The user needs an Access query that lists every customer alongside matching orders for a requested product.

Fix a Microsoft Access LEFT JOIN That Omits Customers
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.
Before you start

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.

Solution 1Recommended

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.

1
Create a filtered orders query

In Access, select Create > Query Design, switch to SQL View, and enter: SELECT CustomerID, ItemOrdered FROM Orders WHERE ItemOrdered = "Strawberry";

2
Save the query

Save the query as qStrawberryOrders. Replace the table, field, and product names in the SQL if they differ in your database.

3
Create the LEFT JOIN

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;

4
Run and check the results

Select Run. Every customer should appear; ItemOrdered will be Null when that customer has no Strawberry order.

Join Customers to a Saved Query of Filtered Orders
Customers can appear more than once: A customer with multiple matching orders will have multiple result rows. If you need exactly one row per customer, use a query based on customer records and an EXISTS or NOT EXISTS test instead of returning individual order rows.
Free Microsoft Office alternative

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.

Review exported customer and order results in WPS SpreadsheetsOpen and edit Microsoft Excel XLSX filesUse a familiar spreadsheet interface for a smoother move from OfficeWork with CSV exports from Access
microsoft office alternative - wps office

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.