I have a report with Field Name = [WO_GrossRev_Var1] which is in the Detail Section of the report. The Datasouce contains a hundred records or so. I want each record on the report to have a BackColor of Yellow (RGB(255, 255, 0))if the value is <-0.0050 else black. On the On Format Event of the report detail, I've added the following procedure which produces no conditional formatting effect:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim MyWOGrossRevVar As Double
MyWOGrossRevVar = [WO_GrossRev_Var1]
If MyWOGrossRevVar < -0.005 Then
[WO_GrossRev_Var1].BackColor = RGB(255, 255, 0)
Else
[WO_GrossRev_Var1].BackColor = RGB(255, 255, 255)
End If
End Sub
Can anyone see the problem with this code? Thank you in advance.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim MyWOGrossRevVar As Double
MyWOGrossRevVar = [WO_GrossRev_Var1]
If MyWOGrossRevVar < -0.005 Then
[WO_GrossRev_Var1].BackColor = RGB(255, 255, 0)
Else
[WO_GrossRev_Var1].BackColor = RGB(255, 255, 255)
End If
End Sub
Can anyone see the problem with this code? Thank you in advance.