I have a report that will show three samples per page in the detail section. One sample has a value of False in a check box field. I have dropped this field into the detail section. I want that row to be highlighted (green in this case) while the other two remain white. This is the code I am using.
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If [My_Control] = 0 Then Me.Detail.BackColor = RGB(183, 233, 169)
End Sub
When I preview the report, all rows are highlighted. I just watched the code run and it looped through the code at least 10 times, I think. I was expecting to run just 3 times.
Anyway, it does work and I'm not sure why.