October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

How to Fix Duplicate Records in an Access Query

Find and fix repeated-looking Access query results by checking duplicate fields, joins, indexes, and safe deletion steps.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To fix duplicate records in an Access query, first find out whether the source table contains duplicate data or whether the query is showing repeated-looking rows because of its selected fields or joins. Use Access’s Find Duplicates Query Wizard to identify records by the fields that define a true duplicate; inspect joins before hiding repeated output, and back up the database before deleting anything.

First identify what “duplicate” means for your data

A duplicate is not simply two rows that look alike on screen. Decide which field or combination of fields identifies the same real-world record for your task. Two people can share a name, for example, and two transactions can share a date without being duplicates. Microsoft’s Find duplicate records with a query guidance lets you choose the fields used for the comparison.

As an Amazon Associate I earn from qualifying purchases.

There are two main cases: duplicate values are stored in a table, or the query produces multiple rows because of its selected columns or joins. The right fix depends on which case you have.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Find duplicates in a table or query

  1. In Access, select Create > Query Wizard.
  2. Choose Find Duplicates Query Wizard and select the table or query to examine.
  3. Select the field or fields whose combined values define a duplicate. Use a composite match, such as customer plus transaction date, when one field alone is not a reliable identifier.
  4. Choose any additional fields you want displayed to help inspect the results, then run the query.
  5. Review the returned records and determine which, if any, should be retained or corrected.

Microsoft lists this wizard for Microsoft 365 Access and Access 2016, 2019, 2021, and 2024. Ribbon wording can vary by localized installation.

When a SELECT query shows repeated-looking rows

In Access SQL, DISTINCT makes rows unique based on the values in all selected fields. If you select CustomerName and OrderDate, the same customer can appear on multiple rows when the dates differ; those field combinations are distinct. Use DISTINCT when the desired result is a list of unique combinations of selected values, not as a way to repair the underlying data.

SELECT DISTINCT [FieldA], [FieldB]
FROM [YourTable];

Replace the example names with your actual table and fields, and select only the values that should define a unique output row. Microsoft documents the behavior of ALL, DISTINCT, and DISTINCTROW predicates and the corresponding Access SQL predicates.

DISTINCTROW is different: it can return unique underlying records in certain joined-query cases. It is not a universal substitute for DISTINCT; Access ignores it for a single-table query and when output fields come from all tables.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check joins if rows multiply after combining tables

A join returns matching records from its source tables. If one record on one side matches several records on the other, the result can correctly contain several rows for that one record. For instance, one customer joined to several orders produces multiple customer-order rows. That is not necessarily duplicate data.

Rank #3
Sale
The Microsoft Office 365 Bible: The Most Updated and Complete Guide to Excel, Word, PowerPoint, Outlook, OneNote, OneDrive, Teams, Access, and Publisher from Beginners to Advanced
  • The Microsoft Office 365 Bible: The Most Updated and Complete Guide to Excel, Word, PowerPoint, Outlook, OneNote, OneDrive, Teams, Access, and Publisher from Beginners to Advanced
  • ABIS BOOK
  • Inspect the fields used in the join and confirm that they represent the intended relationship.
  • Check the relationship’s cardinality: a one-to-many relationship naturally returns multiple matches on the many side.
  • Review whether Access created a join based on an existing relationship or compatible fields, and choose a join type that fits the question.
  • If you need one row per parent record, select parent fields deliberately or use an appropriate unique-record query design rather than suppressing meaningful child records.

Microsoft explains query joins in its Join tables and queries guide and describes performing joins with Access SQL.

Prevent duplicate values from being entered again

If a field must contain unique values, apply a unique index. If uniqueness depends on multiple fields, define the constraint on the combination that represents the real key, rather than on a convenient field that can legitimately repeat.

Resolve existing duplicates before saving the index. Microsoft notes that Access can reject a unique index when duplicate values are already present, with error 3022. See Prevent duplicate values in a table field using an index for the documented approach.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Delete records only after reviewing and backing up

Finding duplicates and deleting them are separate tasks. Before running a delete query, make a backup, verify that you are working in the intended database, consider whether other users are working in the file, and decide unambiguously which row to retain. Microsoft warns that query deletions cannot be undone. Its procedure applies to desktop databases, not Access web apps; see Delete duplicate records with a query.

Best Value

Compare possible duplicates across tables

For records spread across multiple tables, Microsoft recommends a union query as a way to locate duplicate rows. The corresponding output columns must align in order and meaning. In Access SQL, UNION removes exact duplicate result rows, while UNION ALL retains repeated rows.

A union compares rows; it does not determine whether two records represent the same entity or which source is authoritative. Make that decision using the data’s meaning and the fields that identify a record. See Microsoft’s duplicate-query guidance and Access SQL reference for joins.

If expected matches do not appear

Check field types and imported values before concluding that matching records are absent. Similar-looking data can be stored differently—for example, numbers may be imported as text—so fields with different types may not compare as expected. Standardize the values or compare compatible fields. Microsoft describes comparing tables and finding matching data in Compare two tables in Access and find only matching data.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.