Others

Prevent Duplicate Rows in Microsoft Access LEFT JOIN Queries

Khadija KhanKhadija Khan Nov 18, 2026 869 views

Question details

The user needs to prevent unwanted row multiplication when joining three Access tables.

Prevent Duplicate Rows in Microsoft Access LEFT JOIN Queries
Product
Microsoft Access
Device & OS
not provided
Scenario
A LEFT JOIN query combines tables using posting date, material, plant, and purchase order, without a unique identifier shared across all three tables.
Observed behavior
Multiple matching records in the related tables produce repeated rows in the query results.
Before you start

Identify the intended result: one row per source record, one row per transaction, or one row per combination of the four join fields. Check which tables contain multiple records for each combination before changing the joins.

Solution 1Recommended

Aggregate the Related Tables Before Joining

Use this approach when you need totals per posting date, material, plant, and purchase order rather than individual related records.

If Table B and Table C each have multiple matches for a row in Table A, joining them directly can multiply the results. Aggregate each related table to one row per join-field combination first.

This approach does not remove multiple rows already present in Table A. Choose an aggregate such as Sum or Count that matches the information you need.

1
Check match counts

In Access, select Create > Query Design, add Table B, and turn on Totals. Group by posting date, material, plant, and purchase order, then add a field with its Total row set to Count. Run the query to find combinations with more than one record; repeat for Table C.

2
Save an aggregate query for each table

In Query Design, group Table B by the four join fields and set the Total row for the numeric field you need to Sum. Save the query as qryBTotal. Repeat for Table C and save it as qryCTotal.

3
Join the saved queries

Create a new query with Table A, qryBTotal, and qryCTotal. Join Table A to each saved query on all four corresponding fields. In each Join Properties dialog, select the option that includes all records from Table A and only matching records from the aggregate query.

4
Verify the results

Add the fields and totals you need to the query grid, select Run, and compare the output with the original records. Confirm that the totals and the number of Table A rows match the intended result.

Aggregate the Related Tables Before Joining
Do not use DISTINCT as a substitute: DISTINCT can hide identical output rows but does not correct a many-to-many match or prevent inflated totals.
Free Microsoft Office alternative

Work With Exported Access Data in WPS Office

WPS Office is a free, lightweight alternative for working with exported data in a familiar spreadsheet interface. Its Microsoft Office format compatibility makes it easy to move existing files, though it does not repair Access database relationships or LEFT JOIN queries.

Review data exported from Access in WPS SpreadsheetOpen and edit Microsoft Excel formats such as XLSXUse a familiar interface to help ease migration from Microsoft OfficeWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Access LEFT JOIN return more rows than the first table?

A LEFT JOIN returns a row for every match in the related table. If both related tables have multiple matches for the same join fields, those matches can multiply each other.

Can I use DISTINCT to remove the duplicates?

You can set Unique Values to Yes in the query properties or use SELECT DISTINCT, but it only removes identical selected rows. It does not fix incorrect relationships or inflated totals caused by multiple matches.

How do I find which join-field combinations have multiple matches?

In Query Design, turn on Totals, group by the join fields, and use Count on another field. Run the query and look for counts greater than one in each related table.

What if the four join fields do not uniquely identify a transaction?

Look for additional data that genuinely connects the records, or revise the data model to include appropriate parent keys and child foreign keys. If no reliable link exists, the query cannot determine the correct individual matches.