Finding duplicates in a table and recording values in that record.

PuddinPie

Registered User.
Local time
Today, 03:51
Joined
Sep 15, 2010
Messages
149
Hello all,

I've been looking everywhere to find a better way of finding duplicates in a table and then recording and adding another value in that record together.

Let me try to explain better.

example:
I have a table that has 2 columns "Name", "DOB". I would like to find all duplicate "DOB" and add all of the "Name"'s together.

Name DOB
bob 19800201
Sam 19761211
Jim 19800201
The output I would like is to have Name = bob & Jim DOB = 19800201.

I've tried using the find duplicate wizard in access but I can't seem to group them together and just to find the duplicates it takes upwards of a minute.

Any ideas?

Thank you in advance.
 
Hi PuddinPie,
I don't think you will find any standard command or wizard to solve this.
However with a small VBA function it wouldn't be too hard.
Just open the table in that function sorted in DOB and skip through the db line by line creating a string of names if the DOB is the same. If it changes save the name string and the DOB and remember the new DOB and continue skipping until the end.

Have fun :)
 

Users who are viewing this thread

Back
Top Bottom