I need to conditionally format a textbox on a form based on two sets of criteria. The textbox needs to test false for IsDate() and another field requires a value greater than 4. The code I have sets all textboxes on the continuous form to the same color. The code is below. Also, the code is set to run AfterUpdate. How would I set this to conditionally format when the form loads? Thanks for helping.
Code:
Private Sub Stage5Walk1_AfterUpdate() If Me.MaxOfSTAGE.Value > 4 Then
If Not IsDate(Me.Stage5Walk1.Value) Then
Me.Stage5Walk1.BackColor = vbBlue
Else
Me.Stage5Walk1.BackColor = vbWhite
End If
End If
End Sub