How do I link several option buttons to several reports?

D

David1

I am trying to see a different report when I click on the different option
buttons?
 
K

Klatuu

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
 
Top