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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SWITCH HEADERS AND FOOTERS IN ONE REPORT

Status
Not open for further replies.

countof9

IS-IT--Management
Mar 3, 2001
4
CA
I need to have a report print with HEADER 1 and FOOTER 1 printing on the first page. After page 1, I need the header and footer to change to HEADER 2 and FOOTER 2 for the rest of the report. Reason:
I need to print a report that has State regulaions. You must show the title of the document, and the disclaimer at the bottom of the first page. After that,you move to a "continuation" sheet sytle, with no footer at all, and a different heading marked "continuation Sheet" and titles for the columns.
Thanks for any help.....

 
You should be able to put a text box in the page header/footer with the control source, eg:

=IIf([Page]=1,"HEADER1","HEADER2") Best Regards,
Mike
 
In the OnFormat event of the report's page footer, put code like this to only show the footer on page 1:
Code:
If Me.Page = 1 Then
 txtField1.Visible = True
 txtField2.Visible = True 
 Else
 txtField1.Visible = False
 txtField2.Visible = False
End If
As for the page header, you'll have to be more creative. Lay the fields out for both headers as you want them to appear, even if the overlap. In the OnFormat event for the page header you would use similar logic as above, except that if it's page 1, you will make those fields visible, and the others invisible, else vice versa:
Code:
If Me.Page = 1 Then
 txtHead1.Visible = True
 txtHead2.Visible = False 
 Else
 txtHead1.Visible = False
 txtHead2.Visible = True
End If
 
thanks for the responses, both worked well, except I have discovered another problem as a result. The second page (continuation sheet) only prints as far as the footer, then kicks to another page. Because the footer is still "there" only invisible. Is there a way that I can get the text to go past the footer to the bottom of the page(s), and not go "around" the invisible footer?

thanks again.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top