My part monitor form is a columnar form displaying 4 fields from a table. The Status field only has 2 inputs, Open and Accomplished. The goal is to display the Status field in Yellow if the value is Open. This has been working fine, but if I change the value to Accomplish it changes to white. This code works fine, however it is changing the field background to white for all the records even if the value is Open, regardless of which record I update.
I'm sure this is something simple that I'm missing, at least I hope its simple. Anyone have any ideas?
Code:
Private Sub Form_GotFocus()
If Me.txt_stat.Value = "Open" Then
Me.txt_stat.BackColor = 65535
ElseIf Me.txt_stat.Value = "Accomplished" Then
Me.txt_stat.BackColor = 16777215
End If
End Sub
I'm sure this is something simple that I'm missing, at least I hope its simple. Anyone have any ideas?