Duplicate records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form, on which people register in the database. I found a few
duplicate records entered by users. How do I protect from having duplicate
records, the table has AutoID, so it is not 100% duplicate. Other than the
AutoId everything is duplicate.

Thank you
 
Hi.

To protect the table from adding duplicate records, you can assign a unique
index to the table. A primary key qualifies as a unique index -- with the
added benefit that no record will be assigned a NULL value in that unique
index. This primary key can be a single column or multiple columns -- as
long as every record has a different set of values in these particular
columns.

However, you can't assign a primary key or unique index to your table other
than on the AutoID column because there are already duplicates. Either
remove the duplicate records or fix them by hand (alter each duplicate record
so that it is unique from all other records). Only then can you assign a
primary key (or unique index) to the table. The primary key (or unique
index) requires all current and future records to be unique, so any attempt
to add a duplicate record will fail.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)

- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts, so that all
may benefit by filtering on "Answered questions" and quickly finding the
right answers to similar questions. Remember that the best answers are often
given to those who have a history of rewarding the contributors who have
taken the time to answer questions correctly.
 
Back
Top