how to show/hide ribbon or navigation pane by VBA

Discussion in 'Microsoft Access VBA Modules' started by Guest, May 18, 2007.

  1. Guest

    Guest Guest

    Please help me how to show/hide the Ribbon or Navigation Pane in Access 2007
    by VBA.
    Thanks a lot!
     
    Guest, May 18, 2007
    #1
    1. Advertisements

  2. Guest

    Guest Guest

    Two things here. Let's look at them:

    1. Hide navigationpane: Under Officebutton (that round circle with the
    officelogo in it) Click on that. Choose - Access options (bottom Right) -
    Choose option "Current database" from menu on the left; Look in second
    section - checkbox to hide nav. pane.

    2. The ribbon cannot be hidden by default. You can minimize it a bit by
    using ctrl-F1 but it is still visible. If you want all the options of the
    regular ribbons to dissapear you have to write your own "Ribbon" and
    implement this in your DB. Info on this can be found at:
    http://www.accessribbon.com/

    So on short Nav. pane can be hidden Ribbon not.
    --
    Maurice Ausum


    "Didane Pham" wrote:

    > Please help me how to show/hide the Ribbon or Navigation Pane in Access 2007
    > by VBA.
    > Thanks a lot!
     
    Guest, May 19, 2007
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    Thanks for your help. But I want to show/hide NP and Ribbon by code (Visual
    Basic for Application) in order to get more space for displaying forms. Would
    you pls show me how to do it by VBA code!
    Thanks so much!

    "Maurice" wrote:

    > Two things here. Let's look at them:
    >
    > 1. Hide navigationpane: Under Officebutton (that round circle with the
    > officelogo in it) Click on that. Choose - Access options (bottom Right) -
    > Choose option "Current database" from menu on the left; Look in second
    > section - checkbox to hide nav. pane.
    >
    > 2. The ribbon cannot be hidden by default. You can minimize it a bit by
    > using ctrl-F1 but it is still visible. If you want all the options of the
    > regular ribbons to dissapear you have to write your own "Ribbon" and
    > implement this in your DB. Info on this can be found at:
    > http://www.accessribbon.com/
    >
    > So on short Nav. pane can be hidden Ribbon not.
    > --
    > Maurice Ausum
    >
    >
    > "Didane Pham" wrote:
    >
    > > Please help me how to show/hide the Ribbon or Navigation Pane in Access 2007
    > > by VBA.
    > > Thanks a lot!
     
    Guest, May 31, 2007
    #3
  4. Guest

    Guest Guest

    Didane,

    Hiding the nav.pane from code is not an option you would do from code. What
    if the code gets corrupted... Just hide it from the Access options. In regard
    to the ribbon.. well your stuck on at least something because you cannot hide
    that Officebutton and you should always have at minimum one ribbon showing.
    In code you could work with someting like Send Keys (ooopss... can't believe
    I just suggested that to you..). Why don't you try looking at..
    www.accessribbon.com

    hth
    --
    Maurice Ausum


    "Didane Pham" wrote:

    > Thanks for your help. But I want to show/hide NP and Ribbon by code (Visual
    > Basic for Application) in order to get more space for displaying forms. Would
    > you pls show me how to do it by VBA code!
    > Thanks so much!
    >
    > "Maurice" wrote:
    >
    > > Two things here. Let's look at them:
    > >
    > > 1. Hide navigationpane: Under Officebutton (that round circle with the
    > > officelogo in it) Click on that. Choose - Access options (bottom Right) -
    > > Choose option "Current database" from menu on the left; Look in second
    > > section - checkbox to hide nav. pane.
    > >
    > > 2. The ribbon cannot be hidden by default. You can minimize it a bit by
    > > using ctrl-F1 but it is still visible. If you want all the options of the
    > > regular ribbons to dissapear you have to write your own "Ribbon" and
    > > implement this in your DB. Info on this can be found at:
    > > http://www.accessribbon.com/
    > >
    > > So on short Nav. pane can be hidden Ribbon not.
    > > --
    > > Maurice Ausum
    > >
    > >
    > > "Didane Pham" wrote:
    > >
    > > > Please help me how to show/hide the Ribbon or Navigation Pane in Access 2007
    > > > by VBA.
    > > > Thanks a lot!
     
    Guest, Jun 1, 2007
    #4
  5. Guest

    Guest Guest

    Didane,
    I have learned that removing the option to "Allow Full Menus" under "Access
    Options:Current Database" will reduce the ribbon options to just the "Home"
    tab, and will also remove the "Access Options" button from Access icon menu.
    I haven't tried it yet, and don't remember exactly how to get it back, but
    you might check into that.

    Regarding Maurices comments,
    I have been having the same problem as Didane. Apparently, there is a
    school of thought that there is no good reason to show/hide the navigation
    pane via VBA code. I completely disagree, and feel that this is definitely a
    security issue for the databases I work on. I have many clients who use
    Access databases for purposes that have become "mission critical" to their
    respective businesses. For these clients, it is important to control
    practically every aspect of user interaction with screens, reports, etc. The
    database I'm working on right now was tight as a drum when I got it. It even
    deletes all of the links to the tables in a back-end database at startup, and
    won't refresh without a valid password (you really don't want more
    explanation that that). It consists of one primary screen to which everything
    else is subjugated. The user does not have the option to open or close the
    primary screen. The user "lives" there. It is the one and only screen they
    have to work with. However, the myriad objects it references have to be
    available for development. The ability to work with the objects which are
    now wide-open in the Navigation Pane, were completely hidden behind code that
    controlled the use of Special keys, and checked security clearances. To
    figure out how to get into it, you either just had to know the "secret
    combination", or hack it from outside. I have no doubt my client is going to
    be really ticked when they find out that it is so easy to get to the
    Navigation Pane and everything right out there in the open.
    --
    Best Regards,


    "Didane Pham" wrote:

    > Please help me how to show/hide the Ribbon or Navigation Pane in Access 2007
    > by VBA.
    > Thanks a lot!
     
    Guest, Jun 22, 2007
    #5
  6. Guest

    connorjoe

    Joined:
    Feb 23, 2009
    Messages:
    2
    Likes Received:
    0
    You can use the same vba script to hide and show the navigation pane that are used for the show and hide the database window in Access 2003.

    To hide the pane use:

    DoCmd.RunCommand acCmdWindowHide

    To Show the pane:

    DoCmd.SelectObject acTable, , True
     
    connorjoe, Feb 23, 2009
    #6
  7. Guest

    dustinc

    Joined:
    May 4, 2010
    Messages:
    1
    Likes Received:
    0
    You can also just use the name "Ribbon" to hide it.

    Docmd.ShowToolBars "Ribbon",acToolBarNo


    I would also recommend writing a Function in a module that will turn it back on. Unlike Access 2003, the toolbars do not come back when you go back into design mode.
     
    dustinc, May 4, 2010
    #7
  8. Guest

    bdabaum

    Joined:
    Sep 15, 2010
    Messages:
    1
    Likes Received:
    0
    DoCmd.RunCommand acCmdWindowHide actually just hides the active window, it has no direct relation to the Navigation pane unless it's the only visible object in the application.
     
    Last edited: Sep 15, 2010
    bdabaum, Sep 15, 2010
    #8
  9. Guest

    brucewmoore

    Joined:
    May 10, 2011
    Messages:
    5
    Likes Received:
    0
    brucewmoore, May 10, 2011
    #9
  10. Guest

    ron.p

    Joined:
    Jun 5, 2011
    Messages:
    2
    Likes Received:
    0
    1. Hide navigationpane: Under Officebutton (that round circle with the
    officelogo in it) Click on that. Choose - Access options (bottom Right) -
    Choose option "Current database" from menu on the left; Look in second
    section - checkbox to hide nav. pane.


    Why every time I entered Access I need to checks this checkbox?
    Why is this vanigation pane hidden by default in my computer?

    Ron
     
    ron.p, Jun 5, 2011
    #10
  11. Guest

    brucewmoore

    Joined:
    May 10, 2011
    Messages:
    5
    Likes Received:
    0
    You don't have to do it at all, if you don't want to. In most cases, we programmers hide this to keep users out of mischief. The navigation window defaults to be shown, rather than hidden.

    In particular, I would prefer it to be shown while the front end is in my development area, but then need it hidden while my users are running the program.
     
    brucewmoore, Jun 5, 2011
    #11
  12. Guest

    ron.p

    Joined:
    Jun 5, 2011
    Messages:
    2
    Likes Received:
    0
    You don't understand, I'm a programmer, and I want that navigation pane will appear every time I open Access.
     
    ron.p, Jun 5, 2011
    #12
  13. Guest

    brucewmoore

    Joined:
    May 10, 2011
    Messages:
    5
    Likes Received:
    0
    To Un-Hide navigation pane: Under Office button (that round circle with the
    office logo in it) Click on that. Choose - Access options (bottom Right) -
    Choose option "Current database" from menu on the left; Look in second
    section - Check the box to UN-hide nav. pane.

    As I already stated, the navigation pane ordinarily defaults to show up every time you open Microsoft Access.

    If yours is not currently doing so, you will want to make sure whether it has been minimized or not, and possibly hold the shift key going into Access and use the procedure you mentioned to set set it the way that you want it, right clicking on the round button, and putting a check into the "Navigation Pane" option.

    Once you set this check box, it normally stays the way that you set it, with no further interaction. You should be able to leave Access and come back in, and the setting should stay the way you left it.

    If that is not happening, then you have an unusual situation that I am not familiar with.
     
    brucewmoore, Jun 5, 2011
    #13
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest

    Access Navigation Pane VBA access

    Guest, Aug 21, 2007, in forum: Microsoft Access VBA Modules
    Replies:
    1
    Views:
    668
    Jeff Conrad [MSFT]
    Aug 21, 2007
  2. Guest

    Hide Ribbon

    Guest, Oct 1, 2007, in forum: Microsoft Access VBA Modules
    Replies:
    0
    Views:
    261
    Guest
    Oct 1, 2007
  3. dibby44

    How do I hide the ribbon tab named HOME?

    dibby44, Mar 1, 2008, in forum: Microsoft Access VBA Modules
    Replies:
    3
    Views:
    3,895
    dibby44
    Mar 1, 2008
  4. Crossh

    Hide & Unhide Ribbon in Access 2007

    Crossh, Nov 12, 2009, in forum: Microsoft Access VBA Modules
    Replies:
    0
    Views:
    2,141
    Crossh
    Nov 12, 2009
  5. Ronald

    Hide Tab in Ribbon

    Ronald, Feb 1, 2010, in forum: Microsoft Access VBA Modules
    Replies:
    0
    Views:
    461
    Ronald
    Feb 1, 2010
Loading...

Share This Page