Hightlight rows

  • Thread starter Thread starter Janet
  • Start date Start date
J

Janet

I read a tip somewhere about how to hightlight every other
row in a report. When I tried it, I get an error message
that the field "ProductName" can't be found. I'd really
like to do this, but obviously this code has a problem.
Here is the code for the On print event for the detail
section that I was given in the hint:

Const WHITE = 16777215
Const GRAY = 12632256

If (Me![LineNum] Mod 2) = 0 Then
Me![ProductName].BackColor = GRAY
Me![CategoryName].BackColor = GRAY
Me![QuantityPerUnit].BackColor = GRAY
Me![UnitsInStock].BackColor = GRAY
Else
Me![ProductName].BackColor = WHITE
Me![CategoryName].BackColor = WHITE
Me![QuantityPerUnit].BackColor = WHITE
Me![UnitsInStock].BackColor = WHITE
End If


How can I change this code to make it work? (By the way
there was more to the hint, specifically to add the
LineNum field to the detail section that is mentioned in
the code. I followed all the instructions exactly.)
 
Back
Top