Results 1 to 4 of 4
  1. #1
    Join Date
    May 2010
    Posts
    2

    Unanswered: Help tab control and specific tab visibility

    Hello all,

    I have a database set up where the user enters various demographic information for a study participant into the main form. I have also placed a tab control (with 3 pages each containing a subform) into this main form.

    What I want to happen is that, when the user selects a value from a combo box in the main form, one of the 3 pages in the tab control will no longer be visible.

    To be specific to my database, that combo box has a list of 6 Churches that a study participant can belong to. The user of the database will, through that combo box called "ChurchID", select which of those 6 churches each participant belongs to.

    If a Church numbered 1, 3, or 4 is selected, I'd like one of those pages in the tab control to no longer be visible. If a Church numbered 2, 5, or 6 is selected, I'd like a different one of those pages in the tab control to no longer be visible.

    Can someone please help me with this code?

    I think part of the following syntax will work, but I am not sure how to code the rest:

    Me!TabCtl173.Visible = True
    Me!Calls_Made.Visible = True
    Me!Church_A_Checklist.Visible = True
    Me!Church_B_Checklist.Visible = False


    Also, FWIW, the combo box ChurchID already has an After Update event (not sure if a field can have multiple After Update events?)

    Thanks in advance.
    Last edited by UofM2003; 05-26-10 at 19:12.

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    I suspect you want to set the visibility of a specific page, not the tab control itself. You can only have one after update event, but you can do multiple things in it.
    Paul

  3. #3
    Join Date
    May 2010
    Posts
    2
    Yes, that is correct. I edited the original post to say that I want to control the visibility of a specific "page" instead of "tab".

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    This works in a brief test:

    Code:
      If Me.Combo0 = "test" Then
        Me.Page10.Visible = True
      Else
        Me.Page10.Visible = False
      End If
    Paul

Posting Permissions

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