Re: VBA/Access Global Search&Replace from LUT



I should have better described this in my original thread - apologies
I was trying to simplify it so it would be easier to read/comprehend.

Lets start over.

I have 30 tables that have a field that contains an ID (descriptive
ID, text strings of up to 50 characters).
I too thought I could create an update query but I was wrong -
I tried adding all the tables to a query.
I then joined them all to the LUT which I imported into Access.
(joined on the corresponding ID field)
I then did an update query to replace the values.

However, what I have now realised is that other fields also contain
these ID names, but NOT in the same record.

Basically this is for a mapping project and each record is a river
catchment. The ID is unique to that catchment. However, there is
also a field which is Upstream_ID and Downstream_ID, and these too
need replacing with the corrected names. In fact there are a series
of different fields that have ID Names in them but do not correspond
to the actual ID for that record.

So if I were to do it via code, you could do a find and replace for
all fields in all tables and loop through the LUT feeding the Search
string to be the Original ID, and the replace variable to be the
Corrected ID.

Pretty sure that would be the best way to go about it, but not too
familiar on how to actually implement it.

Please advise.

.