Sub SampleRunCanGrowTrue()
Dim strReportName As String
Dim strControlName As String
strReportName = "rptYourReport"
strControlName = "YourControlName"
DoCmd.OpenReport strReportName, acViewDesign
Reports(strReportName).Controls(strControlName).CanGrow = True
DoCmd.OpenReport strReportName, acViewPreview
End Sub
Sub SampleRunCanGrowFalse()
Dim strReportName As String
Dim strControlName As String
strReportName = "rptYourReport"
strControlName = "YourControlName"
DoCmd.OpenReport strReportName, acViewDesign
Reports(strReportName).Controls(strControlName).CanGrow = False
DoCmd.OpenReport strReportName, acViewPreview
End Sub
|