Roger's Access Library Homepage
Forum Home Forum Home > Roger's Access Library > Roger's Download Samples
  New Posts New Posts RSS Feed - RemoveDuplicates.mdb (beginner)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Please consider donating $1 per sample downloaded, (find out why here)

RemoveDuplicates.mdb (beginner)

 Post Reply Post Reply
Roger Carlson View Drop Down
Microsoft MVP
Microsoft MVP

Joined: 20 Feb 2008
Status: Offline
Points: 261
Post Options Post Options   Thanks (0) Thanks(0)   Quote Roger Carlson Quote  Post ReplyReply Direct Link To This Post Topic: RemoveDuplicates.mdb (beginner)
    Posted: 27 Jul 2008 at 11:16pm

Please consider donating $1 per sample downloaded, find out why here.


Illustrates a method for removing duplicate records from a table.

1) If the table does not have a primary key, add an autonumber field. It is essential that the table have a unique field. For example, copy Chains table, add a field called ChainID and make it an autonumber and the Primary Key.

2) Create a delete query like qdelRemoveDuplicatesFromChains2: DELETE * FROM Chains2 AS E WHERE E.ChainID > (SELECT MIN(X.ChainID) FROM Chains2 X WHERE E.Chain = X.Chain);

3) Run the delete query/

Access 97 (74 KB):
Access 2000 (77 KB): uploads/5/
Consider donating $1 per sample downloaded, find out why here.<
Back to Top
Sponsored Links

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.