Selecting optioins .........
People I have 2 sets of same buttons (there are 8). Now this setup is being used for an IPL points table form which accepts 2 teams and team 1 and team2 and so there can be the problem of both radio buttons representing same team can be selected.
Say Mumbai plays Mumbai.
How do I avoid this.
Each set is a control array and each option in both set has same index in both sets. Mumbai has index 0 in team 1 and 0 in team 2 as well.
Please help.
Re: Selecting optioins .........
Could you give a clear idea? Sorry.. It is some what confusing...
Re: Selecting optioins .........
need more clear info, u can post ur code and tell us wher u get error
Re: Selecting optioins .........
I meant radios.Can even use drop downs though.
So its <team 1> vs <team 2>.
Another radio for team 1 wins or team 2 wins .
So third set has only 2.
Then one command but for ok and 1 for cancel.
Re: Selecting optioins .........
Code:
Private Sub Option1_Click(Index As Integer)
Select Case Index
Case 0
If Option2_Click = "mumbai" Then
Form1.Show
End Select
End Sub
Re: Selecting optioins .........
Now I know this wont work but atleast it gives you a fair idea of what i want done.
Re: Selecting optioins .........
Why are you option buttons in an array?
Why are you even using option buttons?
Re: Selecting optioins .........
I think you want something like this?
Code:
Private Sub Group1_Click(Index As Integer)
If Group1(Index).Value = True Then ' just selected this option button
If Group2(Index).Value = True Then ' both groups have same team selected
MsgBox "Cannot select that team", vbOkOnly
Group1(Index).Value = False
End If
End IF
Edited: Similar code would be placed in the Group2 click event.
1 Attachment(s)
Re: Selecting optioins .........
See if the attached form is close to what you need.