Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2003
    Location
    Washington, DC
    Posts
    116

    Unanswered: Make field visible when option selected

    I'm trying to make a form where certain fields are invisible unless one of 4 options is checked. Any ideas?

  2. #2
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    you should add this line into afterupdate events of your option controls. anyway I assumed your option controls are using boolean value.
    Code:
    YourCertainControl.visible=(option1 and option2 and option3 and option4)
    ghozy.

  3. #3
    Join Date
    Sep 2003
    Location
    Washington, DC
    Posts
    116

    Control Visible when option is true

    Can anyone help with this? This suggestion doesn't seem to be doing the trick.

  4. #4
    Join Date
    Oct 2004
    Posts
    1
    Try the following:

    Add this to your afterupdate events of your option group.

    Sub OptionGroupName_AfterUpdate()

    If Me.OptionGroupName.Value = 4 Then
    Me.txtBox.visible = False
    Me.txtBox2.visible = False
    Else
    Me.txtBox.visible = True
    Me.txtBox2.visible = True
    End If

    End Sub

  5. #5
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Good morning ngu0018,

    Very nicely put. And wanted to say Welcome to the Forum It helps in the forum when you lay your explanation out in explicit steps that way. That's how I try to do it also. Anyway, just wanted to shake your hand and welcome you.

    have a nice day,
    Bud

  6. #6
    Join Date
    Sep 2003
    Location
    Washington, DC
    Posts
    116
    Quote Originally Posted by ngu0018
    Try the following:

    Add this to your afterupdate events of your option group.

    Sub OptionGroupName_AfterUpdate()

    If Me.OptionGroupName.Value = 4 Then
    Me.txtBox.visible = False
    Me.txtBox2.visible = False
    Else
    Me.txtBox.visible = True
    Me.txtBox2.visible = True
    End If

    End Sub
    How do I get this to work with multiple options? I tried doing cases, but that failed, and I've tried doing this statement for each option and it failed.

Posting Permissions

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