Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Printing copies with different colors

8 views
Skip to first unread message

Stan

unread,
Feb 8, 2003, 8:20:26 AM2/8/03
to
How can I print multiple copies of a report (4) with each
page heading of a new copy color coded (i.e copy 1=blue,
copy2=yellow, etc).


John Spencer (MVP)

unread,
Feb 8, 2003, 3:59:43 PM2/8/03
to
Add a new table to your database with 4 records.
CopyColors
CopyNum (1,2,3,4)
ColorNum (Number that represents a specific color)

Add this table to your report query with no join and select the copynum and
colornum as fields. This will produce 4 records for each record you want to print.

Add a new grouping level to your report as the first grouping level.
Group on CopyNum.
Add a group header.

Set Page break on the group header.

In the Page header's format event add code that looks like

Private Sub PageHeader_Format(Cancel As Integer, FormatCount As Integer)
Me.Section(acPageHeader).BackColor = Me.ColorNum
End Sub

My test table looks like this.

OrderNum ColorNum ColorName
1 16711680 vbBlue
2 65535 vbYellow
3 255 vbRed
4 65280 vbGreen

Jeff Conrad

unread,
Feb 10, 2003, 12:39:22 PM2/10/03
to
John,

That is SWEET!
What an excellent question and answer.
Definitely filing this away for future use.

Thanks,
Jeff Conrad
Bend, Oregon

>.
>

Stan

unread,
Feb 11, 2003, 7:23:25 PM2/11/03
to
This worked great. Thanks for the reply!!
>.
>
0 new messages