PDA

View Full Version : VBA Data Checking



mattster1010
04-08-2008, 08:46 AM
Afternoon,

I have a table in Access (2002) called Merge1 which is made up of three different fields, First_Name, Surname & Address_1. I have acouple of thousand records and many duplicates in the data. I wish to create a piece of VBA code that will always skip to the second record in the table and check that the First_Name, Surname & Address_1 data is not the same as the last record.

If the data is the same in ALL three fields as the last record then I want to delete the current record, if its not the same moving to the next record performing the check again...

Can anyone help / point me in the right direction please.

Cheers,

Mattster

Carl A
04-08-2008, 01:07 PM
There are different ways to accomplish this. But by far this is the best I've run across. This will delete all duplicate records in your database. HTH.

http://www.databasejournal.com/features/msaccess/article.php/3077791

mattster1010
04-09-2008, 02:13 AM
Thanks very much.....

Looks like a good link to an article that will help my proglem very much!!!