Create a couple of public functions along the lines of
Function HighlightControl()
Screen.ActiveControl.BackColor = vbRed
End Function
Function RemoveHighlight()
Screen.ActiveControl.BackColor = vbWhite
End Function
Go to your form(s) and select each control for which you want to control the
highlighting (you can select multiple by "roping" them, or clicking on them
one at a time while holding down the shift key).
With the controls selected, go to the Properties sheet and set the On Got
Focus property to "=HighlightControl()" (no quotes, but you need the = in
front and the parentheses at the end). Set the On Lost Focus to
"=RemoveHighlight()"
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.