Making Yes/No option buttons mutually exclusive

G

Gloria

I have 4 Yes/No option buttons on a form. I want the user
to only be able to select one of the four options. How can
I do that?
 
R

Rick Brandt

Gloria said:
I have 4 Yes/No option buttons on a form. I want the user
to only be able to select one of the four options. How can
I do that?

Normally you would do that with a single field in the table and use an
OptionGroup with the OptionButtons inside of it. Then the "select only one"
operation is automatic.
 
A

Allen Browne

Delete the 4 buttons from the form.

From the Toolbox (View menu), place an Option Group on your form.
Put 4 options buttons inside the group.

Now that they are in an option group, the user can select one only.

To examine which one is selected, look at the value of the group. If you are
trying to store this into a field in your table, the field should be of type
Number, and it will store the value of the selected button.

If you see two selecting at once, it means the two buttons both have the
same value. This can happen if you duplicate a button in the group instead
of adding another one. You can solve the issue by setting the Value property
of the button (Data tab of Properties box).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top