K
KevinK
I want to highlight the fields that have the focus on my form to help with
data entry. The only code I found is this:
Sub Who Has the Focus()
Dim ctl As Ccontrol
‘ First all backcolors are turned to white
For Each ctl In Me
If ctl,ControlType = acTextBox Then
EndIf
Next ctl
‘Now the currently selected Textbox backcolor is set to yellow
Me.ActiveControl.Backcolor = vbYellow
End Sub
The problem is I have a combo box mixed in, and this code only allows “vb
colorsâ€.
How can I add the combo box and more colors?
data entry. The only code I found is this:
Sub Who Has the Focus()
Dim ctl As Ccontrol
‘ First all backcolors are turned to white
For Each ctl In Me
If ctl,ControlType = acTextBox Then
EndIf
Next ctl
‘Now the currently selected Textbox backcolor is set to yellow
Me.ActiveControl.Backcolor = vbYellow
End Sub
The problem is I have a combo box mixed in, and this code only allows “vb
colorsâ€.
How can I add the combo box and more colors?