C
Crystal T
Someone gave me this code ealier this week but i'm not sure where i need to
put it....DO I PUT IT IN A NEW MODULE AND IF SO WHAT DO I DO WITH IT AFTER
THAT....I'm not that experienced with this so any help would be great...
Crystal
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
put it....DO I PUT IT IN A NEW MODULE AND IF SO WHAT DO I DO WITH IT AFTER
THAT....I'm not that experienced with this so any help would be great...
Crystal
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