Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Option button 2

Status
Not open for further replies.

bobbster2000

Programmer
Sep 19, 2001
102
US
I have a form with 2 fields, Completed and Canceled. Each of them have an option button with them. But for some reason I'm able to select both of them instead of one or the other. How do I make it so the user and only select one of them?
 
Hi!

The easiest way is to add an option group from the toolbox to the form and then place your option buttons in the option group control. Now only one can be selected at a time. I think that you may need to delete the option buttons you have and put new ones in the option group after you have created it. Some more info:

Each option button in an option group has an option value (by default it goes 1, 2, 3, etc. though you can set them yourself).

The option group's value is the same as the option value of the selected button.

hth
Jeff Bridgham
 
Thanks for the helps guys. I added 2 option group buttons. One for completed and one for canceled. Completed option value is 1 and canceled option value is 2. When I switch to the form view the both of them are already selected. What went wrong?
 
Hi!

What is probably happening is that neither are selected (both look greyed in). If you set a default value for the option group then one will be selected when the form opens.

hth
Jeff Bridgham
 
Thanks again. I would like the values I select to be entered in a table I have called "Status". But the "option group wizard" only allows me to choose one of my fields and I need to update both fields( Completed and Canceled).
What do I do?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top