A family of Microsoft relational database management systems designed for ease of use.
Ken's suggestion can easily be expanded to work for any control that has the ForeColor property. First create a function in a standard module (not a form's module):
Public Function Highlight(frm As Form, OnOff As Boolean)
Static PrevColor As Long
With frm.ActiveControl
If OnOff Then
PrevColor = .ForeColor
.ForeColor = vbRed
.FontBold = True
Else
.ForeColor = PrevColor
.FontBold = False
End If
End With
End Function
Then you need to set the OnGotFocus property of each control that can receive the focus (and has the ForeColor property) to =Highlight(Form, True) and the OnLostFocus property to =Highlight(Form, False)
That can be done wholesale by using Shift+Click on each control and then setting the properties for all of the selected controls in one shot. You will have to repeat the selecting and setting properties for each form though.