Results 1 to 2 of 2
2004-05-04, 05:12 #1
- Join Date
- Jan 2001
- Now-Luanda, Angola, Originally - Anna Bay, New South Wales, Australia
- Thanked 0 Times in 0 Posts
Alternating grey lines (2000 SP3)
I have searched high and low but no luck. I have a report which has many rows of data. I would like every second row to have a grey background. Bit like (look out showing my age), the old continuous fan fold paper we used when there were still main frames
SteveDummy from Down Under <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>
2004-05-04, 06:10 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
Re: Alternating grey lines (2000 SP3)
<UL><LI>Open the report in design view.
<LI>Click on the grey bar at the top of the Detail section, or in an empty part of the Detail section. The caption of the Properties window should now read "Sectionetail".
<LI>Activate the Event tab of the Properties window.
<LI>Click in the On Format event.
<LI>Select [Event Procedure] from the dropdown list.
<LI>Click the Builder button (the three dots ... to the right of the dropdown arrow.)
<LI>Make the code look like this:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Static fColor As Boolean
If fColor Then
Me.Detail.BackColor = vbWhite
Me.Detail.BackColor = vbYellow
fColor = Not fColor
<LI>vbYellow displays as yellow on screen, but yields a pleasant gray on most black-and-white laser printers. If you want gray on screen too, replace vbYellow by something like RGB(224, 224, 224). This is a very light grey. Darker shades tend to be too dark on many printers, but you can experiment.
<LI>Switch back to Access (Alt+F11) and save the report.[/list]Note: make sure that all text boxes etc. in the detail section have their Back Style set to Transparent.