G
Guest
I have an event procedure for after update that I got to work on one text box
by experimenting on one field in a blank database. Now, how do I modify that
code so that I can call the routine for any other field that has the focus?
Private Sub field1_AfterUpdate()
Dim StatusNumber As Long
StatusNumber = field1.Text
Select Case StatusNumber
Case "0"
field1.ForeColor = 0
field1.BackColor = 0
Case "1"
field1.ForeColor = 12632256
field1.BackColor = 12632256
Case "2"
field1.ForeColor = 65280
field1.BackColor = 65280
..
..
..
End Case
End Sub
by experimenting on one field in a blank database. Now, how do I modify that
code so that I can call the routine for any other field that has the focus?
Private Sub field1_AfterUpdate()
Dim StatusNumber As Long
StatusNumber = field1.Text
Select Case StatusNumber
Case "0"
field1.ForeColor = 0
field1.BackColor = 0
Case "1"
field1.ForeColor = 12632256
field1.BackColor = 12632256
Case "2"
field1.ForeColor = 65280
field1.BackColor = 65280
..
..
..
End Case
End Sub