SF said:
I have a report that I want to change the background color into 3 alternate
colors eg White, gray and dark gray. How to archeive that?
Add code to the detail section's Format or Print event
procedure. The general idea is along these lines:
With Me.Section(0)
If .BackColor = vbWhite Then
.BackColor = RGB(230,230,230)
ElseIf .BackColor = RGB(230,230,230) Then
.BackColor = RGB(160,160,160)
Else
.BackColor = vbWhite
End If
End With
To make the first line white, use that report header or a
group header section Format evnt to initialize the color:
Me.Section(0).BackColor = vbRed 'anything other than white