Results 1 to 12 of 12
  1. #1
    Patrick.Grant01 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2009
    Posts
    30

    Navigation Pane

    I am trying to control the Navigation Pane to hide or minimise it. How is this done in VBA?



    The only Navigation Pane Objects I can find are for Outlook .......

  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
    From ac2007 Help:
    If you prefer to create your own navigation system, you can hide the Navigation Pane by using the RunCommand macro action and the WindowHide argument. Running this macro action with this argument hides the Navigation Pane for the duration of the current database session.

  3. #3
    Patrick.Grant01 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2009
    Posts
    30

    Thx For Tip.....but.....

    Thanks for the reply. I am still not quite there. If I create a Macro as you suggest and run the macro from the navigation pane, it works. But I am doing this in VBA and the form calling the VBA gets hidden, not the Naviagation bar. Examples I have tried in VBA below..

    Sub testhide()
    DoCmd.RunMacro ("Macro1") 'Runs macro which hides the calling form !!!!
    End Sub

    Sub testhide()
    DoCmd.RunCommand acCmdWindowHide 'Hides calling form !!!
    End Sub

    From reading the Help, I think I should perhaps use the WindowHide method on the Naviagation Pane - but I don't know the object name for the Navigation Pane .....

  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

  5. #5
    Patrick.Grant01 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2009
    Posts
    30

    Exclamation Still Not Got It

    I am a bit closer but still not there yet...

    I found this link on SendKeys which helped a bit as well - http://movefirstblog.wordpress.com/2...he-ribbon-bar/ . As proof of concept, I tried pressing F11 and Navigation Key rolls back the Navigation Pane shutter. I then tried some VBA to do the and I have checked it does execute. Well it does execute but the Navigation Pane shutter does not close. The VBA was:

    SendKeys "^{F11}", True ' which does not work but it would be good if it did

    I tried this in the open event of the first form loaded:

    DoCmd.RunCommand acCmdWindowHide 'and it does work !!!

    but the thing is I cannot reverse it. To control the Navigation Pane I need to Hide and Unhide it or to roll back the Shutter and then open the Shutter.

  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
    I'm out of suggestions, sorry.

  7. #7
    Patrick.Grant01 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2009
    Posts
    30
    Thanks. Have you any idea where I might find further documentation / info on how to control the Navigation Pane in VBA ? Access 2002 help use to have the info. Books like Access 2002 Developers Handbook used to have it -but the book has not been re-written for Access 2007.

    For some reason, it is not in the Basic of Access Help in Access 2007....

    Thanks

  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
    I don't know if this book contains your answer or not.

  9. #9
    Patrick.Grant01 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2009
    Posts
    30
    This book has only a single chapter on Access VBA...and it excludes anything on controlling the Navigation Pane. I think what I need is a book that is nothing but Access VBA.

  10. #10
    Join Date
    Nov 2009
    Location
    Wimbledon, SW London, UK
    Posts
    19
    So what we're saying is that no-one here actually knows how to do via VBA.

    Excellent. Lots of kudos for the first person to crack it!

  11. #11
    Patrick.Grant01 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2009
    Posts
    30
    Quote Originally Posted by James3mc View Post
    So what we're saying is that no-one here actually knows how to do via VBA.

    Excellent. Lots of kudos for the first person to crack it!
    Yep. I think Microsoft are trying to ensure any applications retain Access Features. So there appears to be no VBA that will do this, although there used to be ....

  12. #12
    skooobie is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    1

    Answer - I'm the winner

    DoCmd.NavigateTo "acNavigationCategoryObjectType"
    DoCmd.Minimize

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

Similar Threads

  1. Control Navigation Bar
    By Patrick.Grant01 in forum Access
    Replies: 0
    Last Post: 05-17-2009, 06:16 AM
  2. Database table navigation
    By geoff44 in forum Programming
    Replies: 0
    Last Post: 12-13-2008, 04:05 AM
  3. Control navigation pane
    By ohporter in forum Access
    Replies: 0
    Last Post: 05-27-2008, 12:45 PM
  4. Navigation Code
    By henryclay in forum Forms
    Replies: 2
    Last Post: 11-15-2006, 09:48 AM

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