Command Button that Performs edit-replace

  • Thread starter Thread starter Rob S
  • Start date Start date
R

Rob S

I can't figure out how to program a command button on a
form to acheive the same functionality as the "Edit-
Replace" function that you have while in a table.

If there was only one value that I needed to replace, I'd
simply perform the action by clicking on the menu bar. I
plan on using "SELECT CASE" to program my conditions.

In a field that whose value is "zzzzTAGyyy" I'd like to be
able to click the button, and [with preset conditions],
have it replace the "TAG" part of the value with, for
instance, "CAT." I've tried a number of different,
things, and haven't managed to get it to work properly.

Can anyone help me out?

Thanks!
 
I can't figure out how to program a command button on a
form to acheive the same functionality as the "Edit-
Replace" function that you have while in a table.

If there was only one value that I needed to replace, I'd
simply perform the action by clicking on the menu bar. I
plan on using "SELECT CASE" to program my conditions.

In a field that whose value is "zzzzTAGyyy" I'd like to be
able to click the button, and [with preset conditions],
have it replace the "TAG" part of the value with, for
instance, "CAT." I've tried a number of different,
things, and haven't managed to get it to work properly.

The button should run an UPDATE query, in this example updating the
field MyField to

REPLACE([myfield], "TAG", "CAT")

Note that a field containing three apparently more or less independent
subfields (zzzz, a three letter code, and yyy) is not "atomic" and
therefore relationally suspect: you might want to consider having this
stored as three fields which can be concatenated for display purposes
and updated independently.
 
Back
Top