Changing Field Color

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This group has been amazing, so I hope I am not going to the well too often.
But here it goes.

When I click a button, I want another field to change color. There are a
lot of field on the page and the button loads a file add dialog box and I
want it to be clear what box you are adding the file to. When the dialog
clears, I want the box to return to its base color

Thanks
 
Assuming you're referring to the color of text in a label or textbox, though
the process is the same for any control that provides for "Fore Color"
option,
one changes the color by setting the "Fore Color" property of the control of
interest.

Example: Me.MyControl.ForeColor = 0 would change the text color to black.

or

Me.MyControl.ForeColor = 16711680 would change the text color to Blue.

Such code could be placed in the OnClick event of a command button.

Bill
 
In the On_Click event of your button put Me. fieldname.backcolor=vbyellow.
in the After update event of that Field put Me.fieldname.backcolor=vbwhite.
This will toggle the field color back and forth between yellow and white.
 
Back
Top