hughess7 said:
Thanks Marsh, yes that worked with the Actions now displayed to the right of
the Standards text, but as you suspected the Standards text for row 2 etc do
not display properly as they are all squashed up...
OK, this seems to work.
First, we need to know when the last detail in a group is
being formatted. This is done by adding a text box (named
txtDtlCnt) to the group header section. Set its control
source to =Count(*) so we know how many details are in the
group.
Then add a text box (named txtLine) to the detail section.
Set its control source to =1 and its RunningSum property to
Over Group so we have an identifier in each detail. When
txtLine equals txtDtlCnt, the last detail is being
formatted.
We also need to add another text box (named txtHdrBottom) to
the group header section and leave its control source empty.
This one is used as a place to remember how tall the group
header was after it was formatted.
Now you can use this code to manage the whole mess.
Private Sub Detail_Format( . . .
If Me.txtLine = Me.txtDtlCnt Then 'last detail?
If Me.Top + Me.Height < Me.txtHdrBottom Then
'adjust detail height to reach bottom of the header
Me.Section(0).Height = Me.txtHdrBottom - Me.Top
End If
End If
End Sub
Private Sub GroupHeader0_Format( . . .
Me.MoveLayout = False 'put details on top of header
Me.Section(0).Height = 0 'reset detail height
End Sub
Private Sub GroupHeader0_Print( . . .
Me.txtHdrBottom = Me.Top + Me.Height
End Sub
I think you will like it more if the group header section's
KeepTogether property is set to Yes.