Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to find duplicate records in table using code

Status
Not open for further replies.

Frank72

Technical User
Nov 13, 2001
57
IE
I'm trying to find duplicate names and addresses so as to find repeat customers.I am tyring to start at first record and then enetering an inner loop to compare this record to the rest, at eof i want the pointer to move to the next(second) record and enter inner loop again at the bof.

strFirstName = CustTable![FirstName].Row(StatCount)
strSecondName = CustTable.Row(StatCount)![Surname]

is it possible to refer to a record number using row and a counter. above is my attempt to do this but this is not supported.

Any help gratefully received

Frank72
 
Do you not have a field which is your primary key? If not, you'd be best doing this. Just call it an arbitary name (ClientNum) and make it of type Autonumber. This would insure that no 2 entries got entered twice.
 
Why?

Ms. A supplies a perfectly reasonable find duplicates )query) wizzard.

Use it.

If it is not QUITE what you want, nodify trhe results.

DO NOT (REPEAT ... NOT ...) do this in code.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top