From: Vagabond on
Can anyone help how to get a report footer to print at the BOTTOM of the last
page of the report, not just where the detail of the report happens to end?
Or is there a facility for having a different page footer for the last page
of the report? Or what? I am using Access 07.

Many thanks to anyone willing to lend a hand
From: ghetto_banjo on
If your report footer is something simple, you could use some VB code
to use the Page Footer as a work around. create a function like:


Function DisplayReportFooter() as string

If Me.Page = Me.Pages Then
DisplayReportFooter = "blah blah blah"
Else
DisplayReportFooter = ""
End If

End Function


Then in the Page Footer, you make a text box that is set to:
=DisplayReportFooter()

Then it will only display "blah blah blah" on the bottom of the last
page. Hopefully that helps. You could use multiple text boxes and
functions if you need to.
From: Vagabond on
Thanks g_b, that got me thinking along the right lines. In fact, it's a quite
straight forward (as usual!). You simply have 2 text boxes in the page
footer called, say, page_footer and report_footer and use the following code:

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

If Me.Page = Me.Pages Then
Me.Report_Footer.visible = True
Me.Page_Footer.visible = False
Else
Me.Report_Footer.visible = False
Me.Page_Footer.visible = True
End If

End Sub

The only proviso is that you must have a field that =[pages] somewhere on
the report. This would often be the case anyway but you can always add a
hidden control. Also, you wouldn't have to use text boxes, you could use
individual controls but then you would have to name them all explicitly to
hide or show them.

Thanks for the lead!!

"ghetto_banjo" wrote:

> If your report footer is something simple, you could use some VB code
> to use the Page Footer as a work around. create a function like:
>
>
> Function DisplayReportFooter() as string
>
> If Me.Page = Me.Pages Then
> DisplayReportFooter = "blah blah blah"
> Else
> DisplayReportFooter = ""
> End If
>
> End Function
>
>
> Then in the Page Footer, you make a text box that is set to:
> =DisplayReportFooter()
>
> Then it will only display "blah blah blah" on the bottom of the last
> page. Hopefully that helps. You could use multiple text boxes and
> functions if you need to.
> .
>