locked
Access 2003 compatible VBA to hide navigation pane RRS feed

  • Question

  • Subject line pretty much says it all.  I have a mixed environment of Access 2003, 2007, and 2010 users.  I need to be able to hide the navigation pane from VBA for 2007 and 2010 users in a way that will compile in Access 2003.  I've found a good way to handle the ribbon in a way that's 2003 compatible but not the navigation pane.  Any help is greatly appreciated.  Thanks!

    Bruce

    Tuesday, February 19, 2013 8:39 PM

Answers

  • Hello Bruce,

    Bruce UAMS wrote:

    Subject line pretty much says it all.  I have a mixed environment of Access 2003, 2007, and 2010 users.  I need to be able to hide the navigation pane from VBA for 2007 and 2010 users in a way that will compile in Access 2003.  I've found a good way to handle the ribbon in a way that's 2003 compatible but not the navigation pane.  Any help is greatly appreciated.  Thanks!

    Run in an autoexec makro "DBStart()" code:

    ' In a default module
    Public Function DBStart()
        DoCmd.SelectObject acTable, , True
         RunCommand acCmdWindowHide
    End Function

    HTH
    Gunter


    Access FAQ: http://www.donkarl.com

          http://www.avenius.com - http://www.AccessRibbon.com
    http://www.ribboncreator.com - http://www.ribboncreator2010.com

    • Marked as answer by Bruce Hulsey Wednesday, February 20, 2013 5:19 PM
    Tuesday, February 19, 2013 8:48 PM

All replies

  • Hello Bruce,

    Bruce UAMS wrote:

    Subject line pretty much says it all.  I have a mixed environment of Access 2003, 2007, and 2010 users.  I need to be able to hide the navigation pane from VBA for 2007 and 2010 users in a way that will compile in Access 2003.  I've found a good way to handle the ribbon in a way that's 2003 compatible but not the navigation pane.  Any help is greatly appreciated.  Thanks!

    Run in an autoexec makro "DBStart()" code:

    ' In a default module
    Public Function DBStart()
        DoCmd.SelectObject acTable, , True
         RunCommand acCmdWindowHide
    End Function

    HTH
    Gunter


    Access FAQ: http://www.donkarl.com

          http://www.avenius.com - http://www.AccessRibbon.com
    http://www.ribboncreator.com - http://www.ribboncreator2010.com

    • Marked as answer by Bruce Hulsey Wednesday, February 20, 2013 5:19 PM
    Tuesday, February 19, 2013 8:48 PM
  • Clever!  I like it.

    I ended up doing something like the following for toggling the navigation pane on/off.  In 2003 it toggles the database window which is fine.

    Sub ShowNavPane(f As Boolean)
    
        DoCmd.SelectObject acTable, , True
        
        If Not f Then DoCmd.RunCommand acCmdWindowHide
    
    End Sub

    Thanks for getting me on the right path!

    -Bruce

    Wednesday, February 20, 2013 5:19 PM