How can I Hi-light label of active field?

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Is there a way to have the label of the active field on a
data entry form change its back color? It is sometimes
difficult to tell which field is currently active... if
there was a way to have the label/text box change color
upon activation - and change back once it is not active,
it would be easier to identify which field was currently
active. Any ideas? I tried some expressions but haven't
figured it out.
 
Paul said:
Is there a way to have the label of the active field on a
data entry form change its back color? It is sometimes
difficult to tell which field is currently active... if
there was a way to have the label/text box change color
upon activation - and change back once it is not active,
it would be easier to identify which field was currently
active. Any ideas? I tried some expressions but haven't
figured it out.
Paul

** First make sure the control's BackStyle property
is set to Normal.**

In the control's Got Focus event:
Me!LabelName.Backcolor = vbYellow

In the Control's Lost Focus event:
Me!LabelName.BackColor = Whatever you want
 
fredg said:
Paul

** First make sure the control's BackStyle property
is set to Normal.**

In the control's Got Focus event:
Me!LabelName.Backcolor = vbYellow

In the Control's Lost Focus event:
Me!LabelName.BackColor = Whatever you want

Another option if you don't mind the controls without focus being the same
color as the form's background:

Set all controls BackColor to a color that contrasts with the Form's
BackColor. Then also set all of the control's BackStyle to Transparent.
The transparent setting is ignored for the control that has focus so it
will automatically stand out as you change controls without a single line
of code necessary.
 
Back
Top