Invisible Combo Box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zulema
    New Member
    • May 2007
    • 44

    #1

    Invisible Combo Box

    I have 2 combo boxes. When the user chooses "value" the second combo box becomes visible and this is what i want it to do, but how can i keep the 2nd combo box visible if and only when the first box has "value" selected?
  • JKing
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    #2
    Try this:
    [code=vb]
    Private Sub cboFirst_Before Update(Cancel As Integer)
    If cboFirst.Value = yourValue Then
    cboSecond.Visib le = True
    Else
    cboSecond.Visib le = False
    End If
    End Sub
    [/code]

    Comment

    • Zulema
      New Member
      • May 2007
      • 44

      #3
      Originally posted by JKing
      Try this:
      [code=vb]
      Private Sub cboFirst_Before Update(Cancel As Integer)
      If cboFirst.Value = yourValue Then
      cboSecond.Visib le = True
      Else
      cboSecond.Visib le = False
      End If
      End Sub
      [/code]

      Thank you! It is now visible while i work on that record, but now another problem, what if i want to go back and change it, when i leave the record and come back its not there, or unvisible. I need the second combo box to be visible anytime value is selected whether i leave the record or not, and invisible if value is not selected. Is this possible? Thanks again!!

      Comment

      Working...