I have a form with a field that produces a value based on entries in a sub-form. I have code that produces a different back colour dependent on the value. This works fine provided there is an entry in the sub-form (sometime an entry is not required). If there isn't an entry then the back colour remains the same as the first entry regardless of the value. What am I missing?
Thanks,
Saintsman
Private Sub AvgOfResult_Enter()
If Me.AvgOfResult <= 1 Then
AvgOfResult.BackColor = 12632256
Else
If Me.AvgOfResult > 1 And Me.AvgOfResult <= 7 Then
AvgOfResult.BackColor = 32768
Else
If Me.AvgOfResult > 11 Then
AvgOfResult.BackColor = 255
Else
AvgOfResult.BackColor = 39423
End If
End If
End If
End Sub
Thanks,
Saintsman
Private Sub AvgOfResult_Enter()
If Me.AvgOfResult <= 1 Then
AvgOfResult.BackColor = 12632256
Else
If Me.AvgOfResult > 1 And Me.AvgOfResult <= 7 Then
AvgOfResult.BackColor = 32768
Else
If Me.AvgOfResult > 11 Then
AvgOfResult.BackColor = 255
Else
AvgOfResult.BackColor = 39423
End If
End If
End If
End Sub