Changing Field Color

P

Paul

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
 
B

Bill

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
 
R

rtviper

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top