Private Sub Report_Open(Cancel As Integer)

' Use Msgbox to ask whether to include last year's donations.
Dim intChoice As Integer
intChoice = MsgBox("Include last year's donations in the report?", _
 vbYesNoCancel, "Report: " & Me.Name)

' If the user chooses Cancel then cancel the report.
If intChoice = vbCancel Then
  Cancel = True
  Exit Sub
End If

' Set the visible properties according to the choice.
If intChoice = vbYes Then
  Me.LastYearDonations.Visible = True
  Me.LastYearDonationsLabel.Visible = True
Else
  Me.LastYearDonations.Visible = False
  Me.LastYearDonationsLabel.Visible = False
End If

End Sub

