R
Rich
If you enclose a group of radiobuttons (option buttons in MS Access) in an
option group control (a frame control) in Access -- the frame control will
return the index of the option button that is checked.
In VB.Net if I enclose a group of radiobuttons in a groupbox control - I get
the single checked radiobutton behavior, but the groupbox does not seem to
return the index of the checked radiobutton. Is there a way to get the
groupbox control to return the index of the checked radiobutton? Or is there
some control structure that could do this?
My workaround for now is to add a handler to each radiobutton which will set
its index value to a global variable - call it global_Int. But this seems
kind of kludgy. What is the most efficient way to return the index of the
checked radio button in a group of radiobuttons?
Usage - pseudocode here
Private Sub someControl_Click(...) handles...
console.WriteLine(dataset1.Tables(Frame1.Value).Rows.Count.ToString)
End Sub
vs
Private Sub someControl_Click(...) handles...
If radio1.Checked.Equals(True) then
console.WriteLine(dataset1.Tables(1).Rows.Count.ToString)
ElseIf radio2.Checked.Equal(True) then
....
End Sub
or my current method
Private Sub someControl_Click(...) handles...
console.WriteLine(dataset1.Tables(global_Int).Rows.Count.ToString)
End Sub
Thanks,
Rich
option group control (a frame control) in Access -- the frame control will
return the index of the option button that is checked.
In VB.Net if I enclose a group of radiobuttons in a groupbox control - I get
the single checked radiobutton behavior, but the groupbox does not seem to
return the index of the checked radiobutton. Is there a way to get the
groupbox control to return the index of the checked radiobutton? Or is there
some control structure that could do this?
My workaround for now is to add a handler to each radiobutton which will set
its index value to a global variable - call it global_Int. But this seems
kind of kludgy. What is the most efficient way to return the index of the
checked radio button in a group of radiobuttons?
Usage - pseudocode here
Private Sub someControl_Click(...) handles...
console.WriteLine(dataset1.Tables(Frame1.Value).Rows.Count.ToString)
End Sub
vs
Private Sub someControl_Click(...) handles...
If radio1.Checked.Equals(True) then
console.WriteLine(dataset1.Tables(1).Rows.Count.ToString)
ElseIf radio2.Checked.Equal(True) then
....
End Sub
or my current method
Private Sub someControl_Click(...) handles...
console.WriteLine(dataset1.Tables(global_Int).Rows.Count.ToString)
End Sub
Thanks,
Rich