Hiding Detail Section

J

John

I am trying to hide or show the complete detail section of a report based on
a msgbox routine in the Open procedure for the Report:

Private Sub Report_Open(Cancel As Integer)

If MsgBox("See detail section?", vbYesNoCancel) = yes Then
Me.Section(acDetail).Visible = True
Else
Me.Section(acDetail).Visible = False
End If

End Sub

No joy... any suggestions?

Many thanks
 
Top