Collapse Navigation Pane When Form Loads

  • Thread starter Thread starter Lisa
  • Start date Start date
L

Lisa

Say, is there an easy way to have the Navigation Pane collapse when a form
loads? I'm not a programmer.

Thanks.
 
In the form's Activation Event, found in the properties sheet,
add this code (in the VB window):

Private Sub Form_Activate()
SendKeys "{F11}" <<<< add this code here
End Sub

Of course, if the nav pane is already closed, this will open it ( it toggles
back and forth - try the F11 key to see)...

Damon
 
I had used SendKeys in the macro and it worked, but was far clunkier. This
is easier. Thanks so much.
 
Mark said:
To hide the pane use:

DoCmd.RunCommand acCmdWindowHide

When I tried that in Form_Open event code, it hid my form.
Changing Form_Open to the following both hid the navigation panel and
left my form visible.

DoCmd.SelectObject acTable, , True
DoCmd.RunCommand acCmdWindowHide
 
Good reply, I just put up what I saw on the website. I usually just hide
the navigation pane at startup by unchecking the box in Access options.

I would use this code over the sendkeys method.

Mark
 
Mark said:
Good reply, I just put up what I saw on the website. I usually just hide
the navigation pane at startup by unchecking the box in Access options.

Good point. I was curious to see it work. But didn't pause to consider
whether I would actually use it. :-)
I would use this code over the sendkeys method.

Me, too.

Regards,
Hans
 
Back
Top