G
Graham
Access 2002
I have a report (unbound) with 2 subreports - more subreports later.
The subreports report Age Group counts, and their record source is a query
which in each case returns only one record which could comprise details for 0
- 10 Age Groups. The two subreports are for Adults and Children.
The following code hides unused controls and works fine.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim iCnt As Integer
For iCnt = 1 To 10
If IsNull(Me.Controls("GrpLabel" & iCnt)) _
Then
Me.Controls("GrpLabel" & iCnt).Visible = False
Me.Controls("SumOfGrpCountF" & iCnt).Visible = False
Me.Controls("SumOfGrpCountM" & iCnt).Visible = False
End If
Next iCnt
End Sub
In the detail section of each subreport CanShrink = Yes and in the report
each subreport CanShrink = Yes.
Is it possible to have the report only use the space that is necessary for
the Age Groups that are populated?
I have a report (unbound) with 2 subreports - more subreports later.
The subreports report Age Group counts, and their record source is a query
which in each case returns only one record which could comprise details for 0
- 10 Age Groups. The two subreports are for Adults and Children.
The following code hides unused controls and works fine.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim iCnt As Integer
For iCnt = 1 To 10
If IsNull(Me.Controls("GrpLabel" & iCnt)) _
Then
Me.Controls("GrpLabel" & iCnt).Visible = False
Me.Controls("SumOfGrpCountF" & iCnt).Visible = False
Me.Controls("SumOfGrpCountM" & iCnt).Visible = False
End If
Next iCnt
End Sub
In the detail section of each subreport CanShrink = Yes and in the report
each subreport CanShrink = Yes.
Is it possible to have the report only use the space that is necessary for
the Age Groups that are populated?