Total in Report

C

Crystal T

I have a text box that totals my costs in a quote...I initially put it in my
page footer because I wanted it to display ALWAYS AT THE BOTTOM with my terms
and conditions; however, my quotes sometimes have multiple pages so my total
is showing on every page. I know that if I put it in the Report section it
will display only on the last page and this would be great, but I also have
this text box highlighted yellow and that still shows on the first
page...does any of this make sense?

Any help would be appreciated...

THANKS BUNCHES!!!
 
R

RBear3

If you place your totals in your report footer (not page footer) it will
print where you wish. Not sure what you mean by the highlighting, but the
report footer can include a background color if you'd like.
 
C

Crystal T

If I put my totals in the Report Footer it doesn't display it at the bottom
of my page with my terms and conditions. Is there a way to have my total in
the report footer and make it print at the bottom of the page?

I have my text box highlighted yellow (which runs across my entire report)
and when it's placed in the page footer that highlighted text shows on every
page.
 
C

Crystal T

Baz....I guess I should have told you I'm not an expert at this...could you
tell me where to actually type this code? Do I create a New Module for it
and if so what do I do with it then.

Any Help Would Be Great!!!

Baz said:
How to force a report footer to appear at the bottom of the last page:

Make sure that you have a control with a control source of "= [Page] & " of
" & [Pages]" in the Page Footer. Code the report as follows:

Option Compare Database
Option Explicit

Dim mlngPageFooterTop As Long

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

If Me.Pages = 0 Then mlngPageFooterTop = Me.Top

End Sub

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

Dim ctl As Control
Dim lngHeightDiff As Long

If Me.Pages <> 0 Then
lngHeightDiff = mlngPageFooterTop - Me.Top -
Me.Section(acFooter).Height
If lngHeightDiff > 0 Then
Me.Section(acFooter).Height = mlngPageFooterTop - Me.Top
For Each ctl In Me.Section(acFooter).Controls
ctl.Top = ctl.Top + lngHeightDiff - 10
Next
End If
End If

End Sub


Regarding your yellow box, you say that when you place it in the page footer
it appears on every page. Which is exactly what the page footer is supposed
to do...

Crystal T said:
If I put my totals in the Report Footer it doesn't display it at the bottom
of my page with my terms and conditions. Is there a way to have my total in
the report footer and make it print at the bottom of the page?

I have my text box highlighted yellow (which runs across my entire report)
and when it's placed in the page footer that highlighted text shows on every
page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top