You are currently offline, waiting for your internet to reconnect

ACC: How to Delete Duplicate Records from a Table

This article was previously published under Q109329
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Novice: Requires knowledge of the user interface on single-user computers.

SUMMARY
This article describes how you can remove duplicate records from a table byusing primary keys. By using this method, you can check for duplicatevalues in up to 10 fields in the table.
MORE INFORMATION
To remove duplicate records from a table, follow these steps:
  1. Make a copy of the structure of the table from which you want to remove the duplicate records.

    To copy a table:

    1. Select the table in the Database window,
    2. Click Copy on the Edit menu.
    3. Click Paste on the Edit menu.
    4. Enter a new name for the table.
    5. Select Structure Only
    6. Click OK.
  2. Open the new table in Design view, and select the field(s) that you want to check for duplicates. To make your selection the primary key for the table, click the Primary Key button on the toolbar.
  3. Save and close the table.
  4. Create an append query, and append the data from the original table to the new table. Because the primary key fields in the new table will not permit duplicates, you receive the following error message:

    In Microsoft Access 7.0 and 97:
    Microsoft Access can't append all the records in the append query.
    In earlier versions:
    Errors were encountered...Proceed anyway?
    Click OK. The new table will contain the data from the original table, but will not have duplicates.
NOTE: A fast way to remove duplicate records from a small table is toselect the table in the Database window, click Copy on the Edit menu, andthen click Paste on the Edit menu. In the Paste Table As dialog box, typethe name of the table created in Step 1 in the Table Name box, and selectthe Append Data To Existing Table button. When you click OK, the recordswill be appended from the original table, without the duplicate records.
REFERENCES
For more information about deleting duplicate records, type "deleteduplicate records" in the Microsoft Access 97 Office Assistant, clickSearch, and then click to view "Automatically delete duplicate records froma table."
Properties

Article ID: 109329 - Last Review: 01/18/2007 23:41:28 - Revision: 2.1

  • Microsoft Access 1.0 Standard Edition
  • Microsoft Access 1.1 Standard Edition
  • Microsoft Access 2.0 Standard Edition
  • Microsoft Access 95 Standard Edition
  • Microsoft Access 97 Standard Edition
  • kbfaq kbhowto kbusage KB109329
Feedback