I keep getting errors on trying to hide the 4th sub report. I think it's the way I'm trying to address the nested subreport. I'm putting this code in the main report "On Open"):
-----------------------------------------------------
Private Sub Report_Open(Cancel As Integer)
Dim msg As String, res As String
msg = "Do you want to hide the extensive details (types of coverage)?"
res = MsgBox(msg, vbYesNo)
If res = vbYes Then
Me![child1].Report![Child2].Report![child3].Report![Child4].Report.Visible = False
End If
I've also tried
Me![child1]![Child2]![child3]![Child4].Report.Visible = False
and
Me![child1].Report![Child2].Report![child3].Report![Child4].Visible = False
This is using Access 2007.
-----------------------------------------------------
Private Sub Report_Open(Cancel As Integer)
Dim msg As String, res As String
msg = "Do you want to hide the extensive details (types of coverage)?"
res = MsgBox(msg, vbYesNo)
If res = vbYes Then
Me![child1].Report![Child2].Report![child3].Report![Child4].Report.Visible = False
End If
I've also tried
Me![child1]![Child2]![child3]![Child4].Report.Visible = False
and
Me![child1].Report![Child2].Report![child3].Report![Child4].Visible = False
This is using Access 2007.