How can I Hi-light label of active field?

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.
 
F

fredg

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
 
R

Rick Brandt

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.
 

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