Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Option Button Help Needed Please

Status
Not open for further replies.

specious

MIS
Joined
Jul 23, 2001
Messages
14
Location
US
Could someone please help me figure this one out?
I have an Access form with a option group containing five check boxes. When one of the boxes is selected and a button is pressed, I would like to run a specific report depending on which button is pressed. Can anyone give me some insight on where I should start?

Thanks in advance.
 
Let's assume your option group is called optChooseReport

Private SomeCommandButton_OnClick()
Select Case me.optChooseReport
Case 1
docmd.openreport "Your Report"
Case 2
docmd.openreport "Your Other Report"
Case 3
'etc etc
Case Else
msgbox "Please choose something"
End Select
End Sub
Tyrone Lumley
augerinn@gte.net
 
Thanks for you help so far, just one questions. How do I know which check box is selected and which corresponding report to run?
 
Right click the check boxes and look at their properties. Each one has an Option Value Property. You can accept the default values assigned by Access, or enter your own (being careful not to duplicate).

Tyrone Lumley
augerinn@gte.net
 
Thanks, I think it is working the way we need it to.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top