Bob said:
Marshall, Detail can grow yes
Sub report can grow No.
Well shucks, that rules out several ideas I was
contemplating.
BUT, I finally stumbled over something that works in my
tests (using A2003). It's a little strange so pay attention
;-)
First, add a group (View menu - Sorting and Grouping) using
the expression =1. Specify Yes for the Group Footer.
Add a Page Break control (named pgEject) at the top of the
group footer section. (The Height of the group footer
section doesn't seem to matter!?)
Use the View menu to display the Report Footer section and
move everything you have in the page footer (the subreport?)
to the Report Footer section. Make the page footer
invisible or set its Height to 0.
Then put this code in the report's module. (Make sure you
remove any residual code from our earlier attempts.)
Const TPI As Long = 1440
Const PAPERHEIGHT As Long = 11 * TPI
Const BOTTOMMARGIN As Long = 0.5 * TPI
Private Sub GroupFooter1_Format(Cancel As Integer,
FormatCount As Integer)
Dim FooterTop As Long
FooterTop = PAPERHEIGHT - BOTTOMMARGIN _
- Me.Section(2).Height
If Me.Top >= FooterTop Then
Me.pgEject.Visible = True
Else
Me.pgEject.Visible = False
Me.GroupFooter1.Height = FooterTop - Me.Top
End If
End Sub
Double check that the group footer's OnFormat property is
set to [Event Procedure]
Do not ask me to explain why this worked. I have no idea
what Access is doing when it executes the true part of the
If when FormatCount=1 and the Else part when FormatCount=2.