one line white / one line grey

  • Thread starter Thread starter News Microsoft
  • Start date Start date
N

News Microsoft

Hi,
MS Access is very usefull, but unfortunatly its reporting features are very
limited compared to other report tools such as crystal report. That's why
many people work on acces to manage data and user interface but use Crystal
Report to edit reports ! I think this not very productive to work with many
different tools that do the same thing !

In my case, the problem is that, as you all know, it is easier to read a
report when some line are filled with diffent colors (for ex. 2 lines white
and 1 grey ans so on).

- there is no event such as "On Detail Line Writing" as in other reporting
tools
- any control property i change in the detail section will affect the entire
report, not only the line i would like to.

I am sure Microsoft is working on perfecting that, but meanwhile, any help
welcome.

Ahmed.
 
To print alternating lines of white and gray.

Make sure the BackStyle of each control is Transparent.

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 = 16777215 'Reset color

Change the colors as needed.

If you wanted to do every nth row gray, then it is a little more complex.
Add a control to the detail section.
Set its control source to =1 and
its running sum to overall and
its visible to No (False) and
its name to txtCountLines

Code the Detail Format event:

If Me.txtCountLines Mod 3 = 0 Then
Me.Section(0).BackColor = 12632256 'gray
Else
Me.Section(0).BackColor = vbWhite
End If

Change the 3 in the first line to 4 for every fourth line, etc.
 
Back
Top