Rob,
The Report's Activate event only fires when the report is Previewed.
You can take advantage of that and add some code to the report
to change the section backcolor if the report is previewed.
Here is all the coding you will need.
Option Compare Database
Option Explicit
Dim intPreview As Integer
=====
Private Sub Report_Activate()
intPreview = -1
End Sub
=====
Sub Detail_Format(Cancel As Integer, PrintCount As Integer)
If intPreview < 0 Then
Me.Section(0).BackColor = vbYellow
Else
Me.Section(0).BackColor = vbWhite
End If
End Sub
=====
Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
If intPreview = -1 Then
Me.Section(1).BackColor = vbBlue
Else
Me.Section(1).BackColor = vbWhite
End If
intPreview = intPreview + 1
End Sub
==========
Add the same code as is in the *** Detail Format event *** to any other
section format event you have in your report.
Change the colors as wanted.
Remember to change the section() number to the correct section as needed:
Section(0) Detail Section
Section(1) Report Header
Section(2) Report Footer
Section(3) Page Header
Section(4) Page Footer
Section(5) First Group Header
etc.
--
Fred
Please reply only to this newsgroup.
I do not reply to personal e-mail.