You can use a Select Case statment in the After Update event of the Option
Group control to run the query associated with the button. You do not worry
about the individual button, but the return value of the Option Group
control. Each button has an Option Value property. That is the value
assigned to the Option Group control when the button is clicked. It is as
simple as:
Private Sub optReportSelector_AfterUpdate()
Dim strRptName As String
Select Case Me.opgReportSelector
Case 1
strRptName = "rptManagementDelusions"
Case 2
strRptName = "rptUslessInfo"
Case 3
strRptName = "rptMeaninglessStatistics"
End Select
Docmd.OpenReport strRptName
End Sub
Now, having said that, I would suggest you not use this approach. That is
because each time a new report is added to your system, it will require code
modification and redistribution.
A better technique is to use a combo box with two columns. The first column
is the actual report name and the second is a textual description of the
report. You hide the first column using the combo's Column Width properties
so the user only sees the description. The you have a table with two
fields, one for the name of the report and one for the description. Your
combo's row source would be a query on the reports table.
Then you use the After Update event of the Combo box to run the report.
Using this technique, adding a report requires no modification to your
application - only an additional row in your table.