Colour of active control

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

Guest

My form is black with white lettering. When one of my controls gets focus it
turns into a white box, totally obliterating the text. Is there any way of
changing the colour of the focused control?
 
My form is black with white lettering. When one of my controls gets focus it
turns into a white box, totally obliterating the text. Is there any way of
changing the colour of the focused control?

I don't quite follow you, as the standard Access behavior, when a
control gets focus, is to reverse the back and fore colors, so instead
of white print on black, you would get black print on white.

However, you can change the colors of a control when you enter that
control if you wish.

Code the control's GotFocus event:
Me![ControlName].BackColor = vbRed
Me![ControlName].Forecolor = vbYellow

Then also code the control's LostFocus event:
Me![ControlName].BackColor = vbBlack
Me![ControlName].Forecolor = vbWhite

Change the colors to whatever you want.

Do the same for each control.
 
Damon said:
My form is black with white lettering. When one of my controls gets
focus it turns into a white box, totally obliterating the text. Is
there any way of changing the colour of the focused control?

Transparent background is ingnored for the control with focus in which case the
background color as defined in design view of the form kicks in. Just change
the BackColor to what you want. This will turn transparent off so you need to
reset that afterwards.
 
Back
Top