Public Sub OnFocusColors(frmName As String, ctlName As String)
Forms(frmName).Controls(ctlName).BackColor = vbRed
End Sub
Public Sub LostFocusColors(frmName As String, ctlName As String)
Forms(frmName).Controls(ctlName).BackColor = vbBlue
End Sub
Private Sub Form_GotFocus()
Call OnFocusColors(Me.Name, Text0.Name)
End Sub
Private Sub Form_LostFocus()
Call LostFocusColors(Me.Name, Text0.Name)
End Sub
|