I have a report where the Detail field comes from a query. I perform some calculations and place the data in a field [Text55] When this field is above 99% (0.99)
I want to highlight the background name of the person who achieve this by changing the background color. Here is my code is below. The problem is all the fields are either yellow with the exception of the first one, or they don't change at all. Also, where do I place this code? OnFormat, OnPaint, etc. Right now I have it in the OnPrint field in the Detail. Does not work. As of now, there here is the data for the [text55] field:
0.901
1.24
0.55
0.89
1.09
1.78
I only have 3 records greater than 0.99, but it highlights them all. I just can't seem to figure this out. Please tell me I'm an idiot and show me what I'm
dong wrong. Thank you!
Dim lngcolor As Long
Dim testvalue As Single
lngcolor = RGB(255, 255, 255)
If IsNull(Me!Text55) Then
Exit Sub
Else
If Me!Text55 > 0.99 Then
Me!ManRepName.BackColor = lngcolor
End If
End If
End Sub