PDA

Click to See Complete Forum and Search --> : Duplicate Records


antnee
Aug 12th, 1999, 06:53 PM
I am using ADO to connect to an Acess97 db in a data entry form. Social Sec. # is the primary key I want to be able to check the db for and existing record before allowing another to be added. Is there a way to do a seek on a db to find duplicate records?

Serge
Aug 12th, 1999, 07:41 PM
Try something like this:


SELECT SSN FROM TableName GROUP BY SSN HAVING Count([SSN]) > 1 AND SSN = SSNNumberToCheck;



Regards,

------------------

Serge

Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com