Replace typo with correct word on one field

mafhobb

Registered User.
Local time
Yesterday, 18:55
Joined
Feb 28, 2006
Messages
1,249
Hi

I have a table with a field that gets its values from a combobox. The combobox values come from a list. This db has been in use for months and there are thousands of records in it, unfortunately there is a typo in one of the values I typed for the combobox and that means that this typo is now present in a large number of records.

This typo affects only one field on one table. If this was excel I would simply do a "find and replace" and replace the words with the typo with the correct word in that particular column.

How can I do that with an Access table?

Thanks

mafhobb
 
an update query

update mytable set myfield = "whatever" where myfield = "wrongvalue"

The best solution is not to have text values in the tables, but to have numeric values acting as a lookup to a lookup table. Then you only have to change the text value once, in the lookup table.
 
docmd.runsql "Update tableName fieldToChange = 'correctText' Where fieldToChange = 'typoErrorText';"

just replace the blue ones with correct table names, field name, etc.
 

Users who are viewing this thread

Back
Top Bottom