Table of contents
Collapse the table of content
Expand the table of content

Create Alternating Row Colors on a Report

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

By default, Access formats each row of a report's detail section with the same background color. When printing a report, shading every other line of the detail section can make it much easier to read. You can use the AlternateBackColor property to specify a color to be displayed or printed on every other line in the detail section when viewing or printing a report.

The following example illustrates how to display light gray bars on every other line of the report's detail section when it is printed.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) 

    Me.Section("Detail").AlternateBackColor = RGB(240, 240, 240) 

End Sub
© 2018 Microsoft