Burt said:
What is the more precise approach? I really need to make sure it prints in
the same place each time. Thank you for all your help
The technique I use is to adjust the Height of the last
detail section.
First, add a (hidden?) text box named txtDtlCnt to the group
header section. Set its control source expression to
=Count(*)
Second, add a (hidden?) text box named txtLine to the detail
section. Set its control source expression to =1 and its
RunningSum to Over Group.
The code in the report would be along these lines:
Private lngDetailHeight As Long
Private Sub Report_Open(Cancel As Integer)
lngDetailHeight = Me.Section(0).Height 'save original
End Sub
Private Sub Detail_Format(Cancel As Integer, FormatCount As
Integer)
If Me.txtLine = Me.txtDtlCnt Then
Me.Section(0).Height = 7.5 * 1440 - Me.Top 'expand detail
Else
Me.Section(0).Height = lngDetailHeight ' normal details
End If
End Sub
The code can get quite a bit messier if the last detail
intrudes into the space needed for the footer.