How do I link several option buttons to several reports?

  • Thread starter Thread starter Guest
  • Start date Start date
Use the After Update event of the option group. Each option button will
have an option value. The value of the option group will be which ever
button was clicked. Then you use a Select Case statement to open the
report:

Private Sub opgRptSelect_AfterUpdate()
Dim strRptName As String

Select Case Me.optRptSelect
Case 1
strRptName = "SillyNonsenseReport"
Case 2
strRptName = "UselessInfoReport"
Case 3
strRptName = "ConfusingDataReport"
End Select

Docmd.Openreport strRptName
End Sub
 
Back
Top