Radio Buttons in Access 2003

  • Thread starter Thread starter Zeddy
  • Start date Start date
Z

Zeddy

Hello there

I have built a form in Access 2003. On my form there is a section that I
have used radio buttons. What I would like is when the user selects one of
the buttons the other two are disabled.

Is there a way to do this? I have been searching MS online and other sites
and can't seem to find a solution!

Thanks in advance
Steve
 
Hello there

I have built a form in Access 2003. On my form there is a section that I
have used radio buttons. What I would like is when the user selects one of
the buttons the other two are disabled.

Is there a way to do this? I have been searching MS online and other sites
and can't seem to find a solution!

Thanks in advance
Steve

What you are asking for is normal behavior when you use an
OptionGroup. Open the Form In Design View. Drag the OptionGroup from
the ToolBox onto the form. Add the 3 radio buttons to the group. Set
the OptionGroup's Control source to the field you wish to save the
value to.
When the user selects any one button in the group the others will be
unselected. The value of the OptionGroup is the value of the selected
radio button.
 
The option group makes them "Unselected" but NOT disabled.

Basically in the afterupdate event of the group, do a setfocus to the
next field or some other field and then set the enabled property of
the option group to false.

However, you should think about this.....
What if the user selects the wrong option? How is the user going to
change his mind.

Also in the oncurrent event of the form you will need to enable or
disable the option group depending on whether a value has already been
selected.

Be sure to address mistakes in selection.

Ron
 
Back
Top