format some text boxes bases on the following:
0 to -4.99% = Green
-5.00 to -7.99 = Yellow
< -8.00 = Red
I have used the following code:
If Me.txtDivGL > 0 Or Me.txtDivGL < -5 Then
Me.txtDivGL.BackColor = vbGreen
End If
If Me.txtDivGL < -5 Or Me.txtDivGL > -8 Then
Me.txtDivGL.BackColor = vbYellow
End If
If Me.txtDivGL < -8 Then
Me.txtDivGL.BackColor = vbRed
End If
Why doesn't this work? It always comes up with the wrong color. The
value of the text box is based on a lookup from a table and then
formatted as a percent.
Please help as I am clueless as to why this won't work.