Ask Your Question

Revision history [back]

Thank you Doug & Pierre-yves.

However Pierre-yves your solution works for a WRITER-form and not for a BASE-form. Apologies if I didn't make that clear.

And Doug your solution works IF the option group section is to be AND/ORed i.e. allowing the user to select option 1 AND/OR option 2 AND/OR option 3. That's why you have the get bynames in the code all different. However when I use the option group wizard it names my three groups like this:

image description

See each 'Group Box n' has a named buttons 'RadioGroupn' because I want the user to choose only 1 option from each of the 3 option groups.

I have figured out the code get the user selections:

dim i           as integer
dim selected(3) as integer

    for i=1 to 3
    set optionGroup= frm_ReportingOptions.OptionGroup("RadioGroup"+cstr(i))
        msgbox "option Group Box" & cstr(i) & "=" & cstr(selected(i))
    next i

note the line ...OptionGroup.value+1

that's because it returns the position of the option in each group selected starting at zero.

I hope this discussion might help others.