MS Access radio button option selected

Posted on 2009-02-20
Last Modified: 2012-05-06
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
Question by:YvesBouele
    LVL 75

    Accepted Solution

    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
    LVL 33

    Expert Comment

    by:Mike Eghtebas
    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

    Author Closing Comment

    you're a genius! Thanks
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    "Grade:  A - "you're a genius! Thanks"  "

    You are welcome.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Suggested Solutions

    Title # Comments Views Activity
    Forms or tables Name 4 47
    VB Access SQL question 2 16
    Table Relationships for Linked Tables 2 13
    Greater Than Current Month 2 26
    This article is a continuation or rather an extension from Cascading Combos ( and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
    This isn't a frequent question on EE. I must have seen it three or four times (among several thousand questions). However, I use this trick quite often, most frequently as a delayed Current event. A form does not expose it's calculation dependenc…
    Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now