J.R. Sitman
asked on
How do you create Radio Buttons in Access
I need to create three radio buttons on a form. Each will print a different report.
I've never done this so please provide step by step procedures.
I've never done this so please provide step by step procedures.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I'd agree with Dale regarding the use of Option Buttons (i.e. Radio Buttons). Radio Buttons, Checkboxes, etc are very common UI tools, and users expect them to behave in a certain way. If you make them do something they're not accustomed to - like using multiple Radio Buttons to allow for multiple choices - then you run the risk of a confusing interface.
According to most usage guides, Radio Buttons should be used when the user must make one (and only one) choice - like selecting Gender, for example.
If a user could choose one or more from a group of choices, you should instead use CheckBoxes.
According to most usage guides, Radio Buttons should be used when the user must make one (and only one) choice - like selecting Gender, for example.
If a user could choose one or more from a group of choices, you should instead use CheckBoxes.
ASKER
Got it designed, except nothing happens when I select one of the buttons. How do you get it to print?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
sorry, I don't understand. I copied code from another print event and it doesn't work.. Can you edit it please?
Select Case optiontreatment
Case 1
'print rpttreatmentsadopters
'DoCmd.OpenReport rpttreatmentsadopters
Case 2
'Print rpttreatments
stDocName = "rptTreatments"
DoCmd.OpenReport stDocName, acPreview, wherecondition:="[SoftSlip ] = '" & Me.SoftSlip & "'"
DoCmd.PrintOut Copies:=1
DoEvents
DoCmd.Close acReport, "rptTreatments"
Case 3
'print rpttreatmentsbilling
End Select
Select Case optiontreatment
Case 1
'print rpttreatmentsadopters
'DoCmd.OpenReport rpttreatmentsadopters
Case 2
'Print rpttreatments
stDocName = "rptTreatments"
DoCmd.OpenReport stDocName, acPreview, wherecondition:="[SoftSlip
DoCmd.PrintOut Copies:=1
DoEvents
DoCmd.Close acReport, "rptTreatments"
Case 3
'print rpttreatmentsbilling
End Select
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
got it.
ASKER
Thanks
Welcome!
You may prefer to allow your users to run all three reports at one time and use a command button to initiate the printout based on whic items selected. You can use option buttons without the frame by simply dropping them on your form, but if you want to allow multiple reports to be printed at the same time, I would generally use checkboxes rather than radio buttons