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

Access Report Print/Print Preview Different???

Status
Not open for further replies.

keestes

Programmer
Nov 20, 2003
2
US
I have an access report that looks great when I use print preview. When I select to print the report it doesn't look the same. It appears that in the print preview it is correctly suppressing the Page Footer on pages where it is programmatically set to not visible, but when printed, it isn't printing the footer, but it is reserving or printing the white space where the footer would be. This is causing pages to not fit and continue on the the next page. I am using the code listed below in the report. The report contains several subreports, on of which is displayed in the Page Footer. If I include the Me.PageFooterSection.Height = 0 line in the code it prevents it from expanding, although it causes an error every other time I try to print the report. I am beating my head against the wall on this one. I am fairly new with all of this so any help with this would be greatly appreciated!!
--------------------------------------------------------
Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
If Me.Page = 1 Then
Me.PageFooterSection.Visible = False
Me.PageFooterSection.Height = 0 '********
Else
Me.PageFooterSection.Visible = True
End If
End Sub
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
If Me.Page <> 1 Then
Me.PageFooterSection.Visible = True
End If
End Sub
--------------------------------------------------------
 
keestes,

What about using the report properties to control this instead of code? On the format tab of the report properties try setting the page footer option to 'Not with Rpt Hdr', which will suppress the footer on the 1st/rpt hdr page.

It doesn't answer your code question but it might be the behavior you want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top