Alternate Detail Section color?

  • Thread starter Thread starter CSDunn
  • Start date Start date
C

CSDunn

Hello,
Is there a way in an Access 2000 Report to alternate the background color
behind each record so that every other record has a shade of gray or some
other color behind the record (In the Detail section)?

I'm guessing there might be some trick that can be done with rectangle
control that would reside behind the record controls.

Any ideas?

Thanks!

CSDunn
 
Hello,
Is there a way in an Access 2000 Report to alternate the background color
behind each record so that every other record has a shade of gray or some
other color behind the record (In the Detail section)?

I'm guessing there might be some trick that can be done with rectangle
control that would reside behind the record controls.

Any ideas?

Thanks!

CSDunn

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 your help!
CSDunn

fredg said:
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.
 
I tried to set this up so that the first row of data would be white, but I'm
having problems because the report I need to apply this effect to is a sub
report.
The main report is called RptMM_QDetails_HMR_HMK_Main
and the sub report is called RptMM_QDetails_HMR_HMK_Sub.

I tried a couple of things to get this working, but nothing has worked yet.

What can I do?

Thanks!
CSDunn
 
I tried to set this up so that the first row of data would be white, but I'm
having problems because the report I need to apply this effect to is a sub
report.
The main report is called RptMM_QDetails_HMR_HMK_Main
and the sub report is called RptMM_QDetails_HMR_HMK_Sub.

I tried a couple of things to get this working, but nothing has worked yet.

What can I do?

Thanks!
CSDunn

You'll need to experiment with your SubReport.
Place this line of code in the SubReport's Report Header instead of
the Page Header.
Me.Section(0).BackColor = 12632256

Does that help?
It did for me. I have the Main Report's Group Header ForceNewPage set
to before section, so you'll have play with it to see what you get
with your layout design.
 
Back
Top