DJRobbieBAtl
Technical User
I am using the following code to change the backgroud color of a control when it has the focus, and then back to white when it doesn't have the focus.
Private Sub txtPounds_GotFocus()
Me.txtPounds.BackColor = RGB(255, 255, 128)
End Sub
Private Sub txtPounds_LostFocus()
Me.txtPounds.BackColor = RGB(255, 255, 255)
End Sub
Is there anyway to code the form when it loads to do this to all controls when they get focus and lose focus without actually writing the code to each control? Maybe a Function?
Any help would be greatly appreciated!
Thanks,
thedj
Private Sub txtPounds_GotFocus()
Me.txtPounds.BackColor = RGB(255, 255, 128)
End Sub
Private Sub txtPounds_LostFocus()
Me.txtPounds.BackColor = RGB(255, 255, 255)
End Sub
Is there anyway to code the form when it loads to do this to all controls when they get focus and lose focus without actually writing the code to each control? Maybe a Function?
Any help would be greatly appreciated!
Thanks,
thedj