Make tab page visible/invisible...

Posted on 2008-11-12
Last Modified: 2013-11-28
Dim bolVisibility as Boolean

bolVisibility = Me!tabControlName.TabIndex(0).Visible

Me!tabControlName.TabIndex(0).Visible = Not(bolVisibility)

In an event, I want to switch a tab page from visible to invisible and vs.

The above code dosen't work. What is the correct code?

Thank you.
Question by:Mike Eghtebas
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    How about:

    IF Me!tabControlName.TabIndex(0).Visible = True
        Me!tabControlName.TabIndex(0).Visible = False
    Me!tabControlName.TabIndex(0).Visible = True

    LVL 44

    Accepted Solution

    It is the Page, not the TabControl you want to make inivisible

    Me!Page1!visible = False


    Me!Page1!visible = True

    Pagen is the default name for the page name.  Replace Page1 with your actual value.
    LVL 33

    Author Comment

    by:Mike Eghtebas

    I tired the exact same code. It didn't work.

    I will try it again.


    Yes, it is the page not the tab control.


    LVL 33

    Author Closing Comment

    by:Mike Eghtebas
    Thank you.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
    Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now