Hide Navigation Pane on Single Form Only (1 Viewer)

Breanna

Registered User.
Local time
Today, 00:28
Joined
Dec 29, 2014
Messages
49
I have a data base that when first opened a login form I created pops up. I am trying to set it up so that when it opens you do not see the navigation pane. once logged in though I do want to have access to that again. I have found other VBA code online but nothing that lets me remove the navigation pane from that first form alone. I have it set so that the Ribbon is not shown when the form opens but does show once a user is logged in.

for the ribbon I used:

DoCmd.ShowToolbar "Ribbon", acToolbarNo

I thought I remembered a while ago reading a code like that for the navigation but not saving it because I did not think it would be needed (I am very new to Access) But now I cannot find it. Any help is appriciated thankyou!
 

Eljefegeneo

Still trying to learn
Local time
Today, 00:28
Joined
Jan 10, 2011
Messages
904
I do not know if this will work for you, but I use it on my Db for users that I do not want to see the navigation pane or the tool bar. You can modify it for your own use:
Code:
Private Sub Form_Current()
'Renames the form tab label
Forms!frmOpenFirst1.Caption = "Switchboard"
'Hides the navigation pane for users who get this as the startup screen
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.RunCommand acCmdWindowHide
'hide the tool bar too
DoCmd.ShowToolbar "Ribbon", acToolbarNo
End Sub
 

Breanna

Registered User.
Local time
Today, 00:28
Joined
Dec 29, 2014
Messages
49
Ooh that started what I need to do.
(DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.RunCommand acCmdWindowHide)

I have two types of users. Regular and Admin. For the admin users it brings up a form that has

DoCmd.ShowToolbar "Ribbon" actoolbaryes

this way when a admin logs in that form will bring back the ribbon. Does the command you gave me have something like that as well? I do need that navigation bar back when my admin form opens up.
 

Breanna

Registered User.
Local time
Today, 00:28
Joined
Dec 29, 2014
Messages
49
haha I did find that myself. It is...

DoCmd.SelectObject acTable, , True

but that was perfect thank you it gave me something to look for.
 

Eljefegeneo

Still trying to learn
Local time
Today, 00:28
Joined
Jan 10, 2011
Messages
904
I've been helped so many times on this forum that when I can help someone, it means payback time.

I have two different forms on startup. One for administrators and one for users. The administrator form does not have the code I posted. Depends on who signs in to the db.
 

Users who are viewing this thread

Top Bottom