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 Problem

Status
Not open for further replies.

gulky2002

IS-IT--Management
Nov 21, 2002
13
AT
Hello everybody,
I have a question concerning option buttons.
I arranged two parts of option buttons with on the one side three and the other side two buttons. So I have 2 separate options which should be made. I placed them both within one frame. Now I have the problem, that only one option button of all the FIVE can be active, instead 2 active buttons within each option frame. Can anybody give me a solution?
Hope the situation is clear ;-(

Many thanks for replies.
Herm

P.S.: Sorry for applying this message twice ... 1st I chose the wrong list.
 
Place each group of option buttons on their own fram, and then place the two frames onto the main frame
 
Hi CCLINI,

thats what I already did. I grouped the three and the two option buttons seperately in on frame and placed these frames on another frame ... but the problem is the same.
Any other helpful ideas?

Thanks for setting the link from the other post!!!
 
can u be a bit more clear? see to that that the 1 radio button set is in one frame. ie two frames for 2 sets...

Known is handfull, Unknown is worldfull
 
Ok lets try it a little bit more clear:
- I have one great frame
- on that frame I placed 2 option button frames with on the one hand three option buttons and on the other hand two option buttons
- I like to handle these buttons in the frames last mentioned frames of course seperately ... to do 2 choices, but it is not possible, because I have only 1 active option button switching between the 5 option buttons devided in 2 frames (3 and 2).
Hope its expressed a little bit mor clear!
Thanks
Herm
 
Paste the following code in Form_Load, run the program and let us know exactly what output do you see in the immediate window.
___

Dim C As Control
For Each C In Controls
If TypeOf C Is OptionButton Then
Debug.Print C.Name, C.Container.Name
End If
Next
 
Sorry, i pasted the code into the Form_load section and ran the program. But the form looks the same like ever. It is only shown ONE active optionbutton in the three optiopn frame. The other option frmae with the two buttons is empty (nothing checked).

I get the true/false value from a database and I am shure that i checked in each frame an option.
 
I repeat my words.

"Paste the following code in Form_Load, run the program and let us know exactly what output do you see in the immediate window".
 
There is no other immediate window!
Its just the same view like before.
 
If you're in VB6 then the immediate window (or debug window) can be made visible with Control-G

________________________________________________________________
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.'
 
I am working within the VB6 framework and connected my form to an access database using ADO.

the compilation process works well, so in my immediate window or debug window nothing is stated. It is just one more active option button missing and thats that what my problem is.
 
do the controls recognised during the form_load event? i think it is better to pt it in the form_activate event...

Known is handfull, Unknown is worldfull
 
If you put two frames within a third frame, then put three option buttons on the left frame and two buttons on the right frame, (option buttons 1 - 3 in the left frame and 4 - 5 in the right frame), if you run the program with no code the first button will be selected. To have a selected button on the right frame you can use .....
Private Sub Form_Load()
Form1.Option4.Value = True
End Sub

This will select the 4th button also. So that you have 2 buttons selected, one in each frame. Hope this helps........
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top