different color row to row into access2003 report

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

Guest

hi
i was wondering if its possible to color the rows into a tabular report with
diferent colors, perhaps the color can changed per one row ...
thanks
 
vassilis said:
i was wondering if its possible to color the rows into a tabular report with
diferent colors, perhaps the color can changed per one row ...


Use code in the detail section's Format event:

Me.Section(0).BackColor = <some rgb value>

You will probably also want to set the controls' BackStyle
to Transparent.
 
hi
i was wondering if its possible to color the rows into a tabular report with
diferent colors, perhaps the color can changed per one row ...
thanks

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.
 
Thanks for the code !!!

fredg said:
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.
 
Back
Top