Find and Replace

  • Thread starter Thread starter ganderson
  • Start date Start date
G

ganderson

Im trying to update a portion of a field within a table.
That is, with each record i must change *id=1* to
*id=12345*. This data is within a record that might look
like this, xxxxxxxxxx=id=1xxxxxxxxxx
I need the new field to look like this,
xxxxxxxxxx=id=12345xxxxxxxxxx. How can I define the x'x
with appropriate Wildcards.

Its very simple to do this with find and replace, but i
need to automate it. If an update query is the best way,
how would i do it? Keep in mind that the last set of
xxx's vary.

Or is there a way to do it find and replace in a macro?
 
Ganderson,

As you suggested, use an Update Query, to update YourField to...
Left([YourField],InStr([YourField],"=1")+1) & "2345" &
Mid([YourField],InStr([YourField],"=1")+2)

- Steve Schapel, Microsoft Access MVP
 
Back
Top