Results 1 to 8 of 8
  1. #1
    ecpike is offline Novice
    Windows XP Access 2003
    Join Date
    May 2009
    Posts
    15

    Tab only visible when field = x

    Is it possible to make a tab on a form only visible when the user enters specified information into a field? For instance if the field "EventType" = Fall, then the tab named "Fall" would appear.

    Thanks, Eric

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Each TabPage has a Visible property. Does that help?

  3. #3
    ecpike is offline Novice
    Windows XP Access 2003
    Join Date
    May 2009
    Posts
    15
    No, the visible property is only yes/no, if set to no, it can't be seen at all. I want it to show up under certain circumstances as in the OP...

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by ecpike View Post
    No, the visible property is only yes/no, if set to no, it can't be seen at all. I want it to show up under certain circumstances as in the OP...
    What you say is true. You will need to perhaps use the Current event of the form to check your conditions and set the Visible property of the page accordingly.

  5. #5
    ecpike is offline Novice
    Windows XP Access 2003
    Join Date
    May 2009
    Posts
    15
    OK I got it... I used this thread for ideas: https://www.accessforums.net/forms/h...form-2081.html

    Here was the code that I came up with:
    Code:
    Private Sub Combo22_AfterUpdate()
    If [EventType] = "Fall" Then
            Me.Page6.Visible = True
            
        Else
        
            Me.Page6.Visible = False
            
        End If
    End Sub

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You are also going to want to put something in the Current event of the form. Something like:
    Me.Page6.Visible = ([EventType] = "Fall")

  7. #7
    ecpike is offline Novice
    Windows XP Access 2003
    Join Date
    May 2009
    Posts
    15
    Thanks for your help!

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Any time. Glad I could help. Is it time to mark this thread Solved?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 02-26-2009, 11:31 AM
  2. Quick way to stuff field names into text field
    By kfinpgh in forum Programming
    Replies: 0
    Last Post: 01-04-2007, 01:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums