Navigation Pane Issues (1 Viewer)

Privateer

Registered User.
Local time
Today, 11:21
Joined
Aug 16, 2011
Messages
193
I am posting what I learned today because hours of searching have uncovered something that no one seems to have mentioned. What really happens when you try to hide the navigation pane? I am using Access 2010.

DoCmd.SelectObject acTable, , True 'select the table object in the navigation pane
DoCmd.RunCommand acCmdWindowHide 'close what is selected

Many people say you can omit the table name, and you can, because what I found will fail using either option. The real issue is that the table category has to be expanded to where you can physically see the list of tables. If the tables category is "rolled up", the above commands will not work as expected because the tables were never actually selected. Which means, any form that's open will have the focus and will be hidden; not good if its the main menu.

In my case the open form was the modal form I use to login the user. Modal does not allow the focus to move to the pane. So in the on close event, I select the tables in nav pane and close it, then I open the main menu. Do this in the wrong order and you end up with an empty screen, no open form and no nav pane; lots of fun.

I have looked for a command to "roll down" the table category but I gave up. The "DoCmd.SetDisplayedCategories True, [Category]" wants a category at the end but I can't figure out what they mean by a category and Tables or acTables does not work. In other words, I can't get this thing to work. True means to display it.

If anyone has the code to force the displaying of tables in the pane I would love to have it.

Thanks,
Privateer
 

Users who are viewing this thread

Top Bottom