VBA Code to Consolidate Two Tables and Remove Duplicate Entries

joeyT

New member
Local time
Yesterday, 16:58
Joined
Oct 3, 2013
Messages
3
Hello,

As shown in the following, I have two tables in my Access database. Table 1 has three columns, First Name, Last Name and Phone Number. Table 2 has just 2 columns, First Name and Last Name.

What I would like to do is write a VBA macro to consolidate Table 2 into Table 1 and insure any duplicate First Name-Last Name combination is removed. Any help will be much appreciated

Table1
Code:
F.Name  L.Name   Tel.N.
John       Smith    12345
Larry      Miller     12344
Tony      Woods   12333

Table2
Code:
F.Name  L.Name
Albert     Black 
Larry      Miller
John       Bush

Table1 Post-Macro
Code:
F.Name  L.Name   Tel.N.
John       Smith    12345
Larry      Miller     12344
Tony      Woods   12333
Albert     Black
John       Bush
 
[COLOR=red]'Note that Larry Miller was not added from table2 because it is a duplicate[/COLOR]
 

Users who are viewing this thread

Back
Top Bottom