Alternating Report Color Rows
This example causes the rows in the report to be alternating in Pink, White, and Blue. Change the RGB values around to find your favorite.The code goes into the Build Event for the DETAIL. In the case of a particularly long or detailed report, 3 colors really beats all white.
Private RowNumber As Long
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
RowNumber = RowNumber + 1
If RowNumber Mod 4 = 1 Then
Me.Detail.BackColor = RGB(255, 204, 204)
Else
If RowNumber Mod 2 = 1 Then
Me.Detail.BackColor = RGB(204, 204, 255)
Else
Me.Detail.BackColor = vbWhite
End If
End If
End Sub
Remember, change the background of the fields to Transparent so the color shines through.
|