Results 1 to 9 of 9

Thread: Selecting optioins .........

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    25

    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.

  2. #2
    Lively Member Raiser's Avatar
    Join Date
    Oct 2009
    Location
    Tamilnadu,India.
    Posts
    68

    Re: Selecting optioins .........

    Could you give a clear idea? Sorry.. It is some what confusing...
    Jai Ho... [ May Victory Be Yours]

  3. #3
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: Selecting optioins .........

    need more clear info, u can post ur code and tell us wher u get error
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


  4. #4

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    25

    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.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    25

    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

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    25

    Re: Selecting optioins .........

    Now I know this wont work but atleast it gives you a fair idea of what i want done.

  7. #7
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Selecting optioins .........

    Why are you option buttons in an array?

    Why are you even using option buttons?

  8. #8
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    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.
    Last edited by LaVolpe; Oct 29th, 2009 at 08:05 AM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  9. #9
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Selecting optioins .........

    See if the attached form is close to what you need.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width