Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Header Printed Once in Every Page

Status
Not open for further replies.

HomeGrowth

Technical User
Aug 19, 2004
76
0
0
US
I have a Label field (named lblWarningMsg) in my Header of the report, I want this Label field printed once on 1st header on every page, suppress the label field if the 2nd header appear on the same page.

I have 2 text fields called ctTrainingTypeHeader and ctPageHeader
both have the Control Source set to = 1, and Running Sum set to 'Over All'.

I have the following code OnFormat for the header:

Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)

If Me.ctTrainingTypeHeader = Me.ctPageHeader Then
Me.lblWarningMsg.Visible = True
Else
Me.lblWarningMsg.Visible = False
End If

End Sub

It does not work? even ctTrainingTypeHeader not = to ctPageHeader on the 2nd header of the report. Is there another way to do it? Thanks.
 
You stated "does not work" without telling us the actual results. Why don't you use a page header section for the labels?
I don't understand
HomeGrowth said:
even ctTrainingTypeHeader not = to ctPageHeader on the 2nd header of the report.

Duane
Hook'D on Access
MS Access MVP
 
This is the actual result: The report has 2 pages (the second label should not be printed on page 1 because ctPageHeader <> ctTrainingtypeHeader):

on Page 1

ctPageHeader = 1
ctTrainingtypeHeader = 1 lblWarningMsg

ctTrainingTypeHeader = 2 lblWarningMsg


on Page 2

ctPageHeader = 2
ctTrainingTypeHeader = 2 lblWarningMsg


I use the label to print out a Warning Message, but I only want it to show once on every page if there are 2 field headers.

What I want to do: How to suppress a Warning Message which is a label field on only the 2nd header in every page. Thanks.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top