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

Pagefooters in Reports

Status
Not open for further replies.

bterri

Technical User
Jan 4, 2001
13
US
I put the following code in my report to subtotal each page.

Dim x As Double

PageFooter Print

pagesum = runsum - x
x = runsum

ReportHeader Print
x = 0

The subtotals are printed at the bottom of each page which is great but on the last page where I added the grand total to the report footer the page footer subtotal prints under the grand total.

How do I tell Access on the last page of my report to put the page footer above the report footer? It will move every month based on the number of pages and records.

Any ideas?
 
The trick is to suppress the page footer when it is the last page and include the page footer field in the report footer.

To check for the last page you can use the system fields Page and Pages. Thus in the page footer print event :


If Page = Pages Then
txtThePageSum.Visible=False
Else
txtThePageSum.Visible=True
EndIf


Bill Paton
william.paton@ubsw.com
Check out my website !
 
This works to move the pagefooter where I want it but it still prints the footer at the bottom of the last page. The field is a calculated field, would that make a difference.
 
I have:

If Page = Pages Then
subtot.Visible=False
Else
subtot.Visible=True
EndIf
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top