VBA/Access Global Search&Replace from LUT



Ok. I need to develop a macro/vba code to do the following.

I have a database with 30 tables. Theres a NAME field in nearly all of the tables.

I have been given a spread*** with two columns. One contains the NAME of every unique record in the database and the second column is contains either the newly correct NAME or its blank.

I need to automate replacing all of the incorrect NAMEs in the database with the correct NAME entry.

There are at least 300 corrections and its expected for this to happen
a lot more in the future.

Therefore id like a nice button that does this all for me.
In my head the method should go something like this:

1. Import spread*** into database and use it as a Look Up Table.
2. Record a macro: Open a table, search&replace for (incorrect) NAME
in target table and replaces with (correct) NAME from LUT. Repeat
for every table. Stop Macro.
3. Step into Macro and somehow adapt it to use each record out of LUT
as a variable to begin with and search and replace with.

Sorry that sounds a bit vague. Im a bit of an amateur with Access &
VBA.

Any pointers on how to do this, or snippets would make my life a lot
happier.
.


Quantcast