Changing background color on controls

johnroger

New member
Local time
Today, 16:58
Joined
Feb 28, 2002
Messages
3
Hello,
As I tab through a form, how can I change the color of the control that has just received the focus.

John
 
Try the OnGotFocus property of the control. Add code which will change the backcolour such as:

Me.Combo5.BackColour = 255

Then use the onLostFocus property to return it to its normal colour.
 
As an alternative, if you're running Access 2000 or later, you could use Conditional Formatting.

In Form Design mode, select the control you want to highlight from the menu select Format -> Conditional Formatting. Select "Field Has Focus" as the condition and then set the appropriate formatting properties.

Simon.
 
Hello Simon,

That's what I needed.

Thank you very much.

John R.
 

Users who are viewing this thread

Back
Top Bottom