Can I use a query to find and replace a word in a string?

K

Karla

I have a table with a field that has descriptions and I want to find and
replace only a portion of various records. Is it possible to do this? For
example if the field said Routed to NAAO TelePartner .....I only want to
change the TelePartner to TeleSales.
 
D

Duane Hookom

If this is a one time update, open the table in datasheet view and use the
find and replace in the edit menu.
 
K

Karla

It is not a one time update it will be a monthly occurance and the user will
not be able to access the table only a form, so I was hoping to link the
query to the form for the update. Any thoughts?
 
D

Duane Hookom

You could create an update query like:

UPDATE tblNoNameGiven SET [Description] =
Replace([Description],"Telepartner","TeleSales")
WHERE [Description] Like "*TelePartner*";
 
J

Jeff Boyce

Karla

In addition to Duane's suggestion, if this is a known, repeating situation,
you could consider creating a table that lists the "As It Comes In" version
and the "As I Want It To Be" version. That way, you wouldn't actually need
to change anything, you could just use a query to link on that field and
generate the "As I Want It To Be" for your forms/reports.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Top