Highlight when moving

  • Thread starter Thread starter Greta
  • Start date Start date
G

Greta

When I move around in a form, from field to field, I want
the field I'm currently in to be highlighted. Can I do
that? Instead of just the cursor flashing, I'd like to
box to light up.
Thanks,
Greta
 
You could use the OnGotFocus and OnLostFocus events for each control to
change the back color of that control.

Private Sub ctlName_GotFocus()
Me.cltName.BackColor = vbRed
End Sub

Private Sub ctlName_LostFocus()
Me.cltName.BackColor = vbWhite
End Sub
 

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

Back
Top