Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Aug 2004
    Location
    New York, New York, USA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Control Visibility Based Upon A Condition (Access

    Hi, I am new to the posting. I am making a database that has 3 controls. The 3rd control is not visible currently. I would like it to be visible only if the first control's answer is a certain answer. The first control is a combo box, with limit to list turned on. An example is Control 1's answer is 25. The 3rd control should remain invisible. But if Control 1's answer is 30 the third control should become visible. Thanks for your help.

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Control Visibility Based Upon A Condition (Access

    In the after update event of the combo use following code :

    Private Sub ComboName_AfterUpdate()
    If Me.ComboName = 25 Then
    Me.ThirdControl.Visible = False
    Else
    Me.ThirdControl.Visible = True
    End If
    End Sub

    Replace ComboName and ThirdControl with the names of your controls.
    Adjust also the condition like you want.
    To be complete, you should call the sub in the On Current event of the form :

    Private Sub Form_Current()
    Call ComboName_AfterUpdate
    End Sub
    Francois

  3. #3
    New Lounger
    Join Date
    Aug 2004
    Location
    New York, New York, USA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Control Visibility Based Upon A Condition (Acc

    Thanks Francois,

    Your quick response helped me very much, I appreciate it.

Posting Permissions

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