How to get a value of radio button in the option group Access VBA

ms-access, vba

Solution

Option Groups return an integer value starting at 1 and going up from there. If your option group is called Fld_Opt_Method then try `Me.Fld_Opt_Method`:

`If Me.Fld_Opt_Method = 1 Then msgbox "first option"` `If Me.Fld_Opt_Method = 2 Then msgbox "second option"`

Problem

I've an Access 2010 form that contains 2 radio buttons. One for Yes and one for No in Option Group. How do I get the selected value? i.e. - whether user selected Yes or No, using VBA.

Original source