command button forcolor and caption change

  • Thread starter Thread starter manchery
  • Start date Start date
M

manchery

HI,
I have a form (continuous) with say 20 records. for Each
record there is a filed known as [Action] and a command
button. I would like to know how can i change the command
button color and caption as per the value in the field. I
tried with some code but it changes all buttons at a time.
anyone to assist how can i do this pls.
 
Manchery

I don't know of any better way than this, unfortunately... Use
Conditional Formatting. However, Conditional Formatting only applies to
textboxes, not command buttons. Therefore you need to use an unbound
textbox in place of the command button, and use a calculated expression
in its Control Source to change the "caption". With a bit of tweaking,
you can get a textbox to look "almost sort-of like" a command button.
 
Back
Top