Advertisement
ASP_Volume2 Databases/ Data Access/ DAO/ ADO #33143

Access deduplication

We had a client who 'accidently' copied one databse table into itself causing duplicate records. Unfortunately Access only allows 10 columns in its De Duplicate wizard and we had twenty! This code allows you to pick the database you want deduplicating, lists the tables and the fields within the table so that you can chose the 'key' fields to deduplicate on. Then it creates a table within the database which contains all of the deleted duplicates from the table you chose. It assumes that you don't mind which instance of a duplicate record you want to keep and it uses Jet 4.0. Also if you run the appliaction twice on the same table you will loose all of the deleted records from the first session (it dosent create a second instance of the deleted table). It also dosen't contain Error trapping as I use Aivostso's VB Watch addin that creates error trapping for you. However, leaving that in would add superflous code so I have omitted it here. This code was wriiten on the quick but it has ben used in anger with correct results. Any constructive comments will be appriciated.

AI

สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ซอร์สโค้ด
original-source
Upload
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine