G
Guest
I'm trying to alternately highlight rows in a report by the Date field. I'm
using the following code in the Group Header:
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
m_RowCount = Format([tblwodDate] + 1, "General Number")
If m_RowCount / 2 = CLng(m_RowCount / 2) Then
Me.Detail.BackColor = 16777215 'Change value to the color you
desire
Else
Me.Detail.BackColor = 15790320 'Change value to the color you
desire
End If
End Sub
The result I'm getting is that ALL of the records are highlighted, not
alternately by different dates.
I've also tried placing a non-visible text box in the detail section and
making "m_RowCount" equal the text box +1 (formatted as a General Number).
Still no luck.
Any suggestions?
using the following code in the Group Header:
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
m_RowCount = Format([tblwodDate] + 1, "General Number")
If m_RowCount / 2 = CLng(m_RowCount / 2) Then
Me.Detail.BackColor = 16777215 'Change value to the color you
desire
Else
Me.Detail.BackColor = 15790320 'Change value to the color you
desire
End If
End Sub
The result I'm getting is that ALL of the records are highlighted, not
alternately by different dates.
I've also tried placing a non-visible text box in the detail section and
making "m_RowCount" equal the text box +1 (formatted as a General Number).
Still no luck.
Any suggestions?