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 .......
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 .......
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.
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 .....
Maybe this link will be helpful:
http://movefirstblog.wordpress.com/2...e-shutter-bar/
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.
I'm out of suggestions, sorry.
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
I don't know if this book contains your answer or not.
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.
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 ....
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.Minimize