Option Compare Database
Option Explicit
Dim fshade As Integer
----------------------------------
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Const COLOR_SHADE = &HECECEC
Const DS_INVISIBLE = 5
If fshade = False Then
Me.DrawStyle = DS_INVISIBLE
Me.Line (0, 0)-(7034, Me.Section(0).Height), COLOR_SHADE, BF
End If
fshade = Not fshade
End Sub
------------------------------------------------
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
fshade = True
End Sub
-----------------
Adjust the Me.Line() and COLOR_SHADE to suit.
I hope I'm not violating any copyright... I got this originally from a Ken
Getz Access 2.0 book.
hth
Al Camp
To answer your question here is an excert from an earlier
posting by Marshall Barton:
It's simpler using code.
Without code, if you're using A2K or later, First, add a
text box named txtLineCtr, make it invisible and set its
expression to =1.
Make the BackStyle of all of your current controls
Transparent.
Then add another text box (the same size as the entire
detail section) and use The Format - Send To Back menu
item to put it behind all the other controls. Now you can
set tis text box's Conditional Formatting - Expression Is
txtLineCtr Mod 2 = 0
with your selected background color.
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.