Results 1 to 4 of 4

Thread: Options

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600

    Question

    Hi all.

    I have 2 options buttons (a control array) in a frame. When you display the form, neither button is selected. When you click on 1 button, it becomes selected of course.

    Is there a way to de-select both buttons after 1 of them has been selected? In other words de-select both buttons (make them False) like they are when the form is initially displayed, after giving 1 of them a value of True by clicking on it? It seems like you can only change which one is selected, but not de-select both.

    I hope you all understand what I'm trying to do.

    Thanks for any help.

  2. #2
    Guest
    Try:

    Code:
    Private Sub Option1_Click(Index As Integer)
        
        If Index = 0 Then
            Option1(0).Value = False
            Option1(1).Value = False
        End If
        
    End Sub

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    'no need to click on 1 to clear 2

    Code:
    Private Sub Option1_Click(Index As Integer)
      
      If Index = 0 Then
            MsgBox "Number 1 and still false" 'your code
            Option1(0).Value = False
            Option1(1).Value = False
      Else
            MsgBox "Number 2 and still false" 'your code
            Option1(0).Value = False
            Option1(1).Value = False
      End If
      
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600

    Thanks Megatron.

    Even though I didn't want the value to change on the click event of one of the Option buttons, your code helped me figure out what I was doing wrong.

    HeSaidJoe, I just saw your post. Thanks for replying. I figured it out.


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