How to alternate background colour in a report

  • Thread starter Thread starter PFMcCracken
  • Start date Start date
P

PFMcCracken

I have a request to alternate the report background colour as the field for
the Day-date changes. I know there is a parameter that can be referenced
about the background colour, but I am not sure about how to get it
"programmed" into the report.

Philip
 
I have a request to alternate the report background colour as the field for
the Day-date changes. I know there is a parameter that can be referenced
about the background colour, but I am not sure about how to get it
"programmed" into the report.

Philip

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top