alternating line color in report

J

JohnE

Greetings. I have a dillemma regarding the alternate line coloring in
reports. But, what I am finding is that even tho the reports are constructed
the same, some reports will only have 1 of the colors (light yellow) used
rather then alternating. Has anyone else had this occur? If anyone can
assist in correcting this, thanks. The following code is used for the
alternate line color.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
m_RowCount = m_RowCount + 1
If m_RowCount / 2 = CLng(m_RowCount / 2) Then
Me.Detail.BackColor = 15263976
Else
Me.Detail.BackColor = 14811135
End If

End Sub

*** John
 
D

Duane Hookom

Where have you "Dim'd" m_RowCount? Should be in the general declarations in
the report's module.
 
J

JohnE

Duane, thanks. I missed putting - Private m_RowCount As Long - in the dec of
the reports that the colors weren't alternating. It is working now.
*** John
 
Top