How do I show a different color every other line in a report?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to make every other line of data on my report grey...how can I
do this?

Any help would be greatly appreciated.

Thanks,
Mark
 
Mark10101010 said:
I would like to make every other line of data on my report grey...how
can I do this?

Any help would be greatly appreciated.

Thanks,
Mark

In the OnFormat event of the section...

If Me.Details.BackColor = 12632256 Then
Me.Details.BackColor = 16777215
Else
Me.Details.BackColor = 12632256
End if
 
I would like to make every other line of data on my report grey...how can I
do this?

Any help would be greatly appreciated.

Thanks,
Mark

Make sure the BackStyle of each control is Transparent.

Code the Detail Format event:

If Me.Section(0).BackColor = vbWhite Then
Me.Section(0).BackColor = 12632256 ' gray
Else
Me.Section(0).BackColor = vbWhite
End If

====
If you wish each page to start with a white row, code the Page Header
Format event:

Me.Detail.BackColor = 12632256 'Reset color to Grey so that the
first detail line will become white

Change the colors as needed.
 
Rick Brandt said:
In the OnFormat event of the section...

If Me.Details.BackColor = 12632256 Then
Me.Details.BackColor = 16777215
Else
Me.Details.BackColor = 12632256
End if

Got it...Thank You!
 
Back
Top