Re: Check for Many Duplicate SSN's
- From: "Roger Carlson" <NO-Rog3erc-SPAM@xxxxxxxxxxx>
- Date: Fri, 26 Aug 2005 14:23:47 -0400
It doesn't matter. You don't have to find the duplicates and delete them
before running the Append query. With a Unique Index on the SSN, a
duplicate value will be rejected regardless of how you try to add it.
Michael's method will work and has the added benefit of putting the errors
in the Paste Errors Table. But even if you are importing them directly to
the table, no records can be added that have a duplicate SSN as long as the
unique index is set.
BTW, while you CAN make the SSN the Primary Key, it doesn't have to be. All
that's necessary is that it has a unique index. This is done in the field
properties list under Index. Set the value to Yes (No Duplicates).
--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
"Randy Blake via AccessMonster.com" <forum@xxxxxxxxxxxxxxxxx> wrote in
message news:536DF8388CED4@xxxxxxxxxxxxxxxxxxxx
> yes, but I'm importing new records into an exisitng table. How do I code
to
> list the duplicates found before running the append query?
>
> I'm thinking I might need a popup form to list any duplicates found so
that
> they can be deleted first and then run the append query,,,not sure.
>
> thanks,
>
> Roger Carlson wrote:
> >Well, if you simply create a Unique Index on the SSN field and write an
> >Append query, the duplicates will be automatically rejected. However,
you
> >need to know that under rare circumstances, legitmate duplicates of
Social
> >Security numbers can exist.
> >
> >> I have an import button that imports data from excel to my access
database
> >> which is viewable in a form. My form is in data*** view. There can
be as
> >[quoted text clipped - 7 lines]
> >> Thanks,
> >> Randy
>
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200508/1
.
- References:
- Check for Many Duplicate SSN's
- From: Randy Blake via AccessMonster.com
- Re: Check for Many Duplicate SSN's
- From: Roger Carlson
- Re: Check for Many Duplicate SSN's
- From: Randy Blake via AccessMonster.com
- Check for Many Duplicate SSN's
- Prev by Date: Re: Add control to a UserForm
- Next by Date: Re: Form Searching
- Previous by thread: Re: Check for Many Duplicate SSN's
- Next by thread: Re: Check for Many Duplicate SSN's
- Index(es):