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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

clearing control array option buttons

Status
Not open for further replies.

Newatprogramming

Technical User
Mar 5, 2002
30
0
0
US
On a cmdClear command button in a form. I am trying to clear the option button.

I can clear the option button by setting the option button
to

optButton = -1

But the problem the form has cleared the valve but the form still shows that one of the item is checked. When I the form loads the option button are clear?

Any help would be great.
 
First of all, use vbUnchecked to clear an option button. The most painless way I have found to handle option buttons is to add one more invisible button. If I want all the other optiion buttons cleared, I just set to invisibleoption.value = vbchecked. Forms/Controls Resizing/Tabbing Control
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
Thanks for the help. WHat I end up doing was to set the optButton = false
optButton = -1

and it worked

Thanks for help though. You made me think!!!
 
JY, You're slipping!
Option Button > True or False
CheckBox > vbChecked, vbUnchecked, vbGrayed
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top