Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1506
  • Last Modified:

MS Access radio button option selected

I would like to know how can I tell which radio button option was checked or selected in Ms Access form so I can change the state of another control within the same form
  • 2
1 Solution
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Put this code in the AfterUpdate event of the control

Private Sub YourControlName_AfterUpdate()

Select Case YourControlName

    Case 1
         ' do what ever 1

    Case 2
         ' do what ever 2

    Case 3
         ' do what ever 3

End Select

End Sub
Mike EghtebasDatabase and Application DeveloperCommented:
if your option control is named opOption1, then
If me!opOption1 = 1 then

    msgbox "Option 1 is selected"
ElseIf me!opOption1 = 2 then

    msgbox "Option 2 is selected"

ElseIf me!opOption1 = 3 then

    msgbox "Option 3 is selected"
End IF
YvesBoueleAuthor Commented:
you're a genius! Thanks
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"Grade:  A - "you're a genius! Thanks"  "

You are welcome.


Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now