A family of Microsoft relational database management systems designed for ease of use.
I also tried to put that same line of code on the On Open Event of the "TFS Staff" Form and it won't hide the navigation pane unless I manually open the form.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
What is the OptionName for the "Display Navigation Pane" button for MS Access.
I have the following code that disables the Status bar for the Database but I need the same result for the Navigation pane but I need the OptionName of that button.
Application.SetOption "Show Status Bar", False
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
I also tried to put that same line of code on the On Open Event of the "TFS Staff" Form and it won't hide the navigation pane unless I manually open the form.
It still did not hide the navigation pane. I created that table, with the exact same name and field in it making it a primary key. I have all of this code inside of this If Statement. If the user is a Developer("1") then nothing will hide but if the user is an employee(Else Statement) it will open a form with the employee dashboard, it will hide the ribbon and status bar but it did not hide the navigation pane. Any ideas?
If Me.txtPassword = Me.cboUser.Column(2) Then
'Check if password needs to be reset
If Me.cboUser.Column(3) = True Then
DoCmd.OpenForm "frmPasswordChange", , , "[UserID] = " & Me.cboUser
End If
If Me.cboUser.Column(4) = "1" Then
DoCmd.OpenForm "MAIN"
Me.Visible = False
Application.SetOption "Show Status Bar", True
Else
DoCmd.OpenForm "TFS Staff"
DoCmd.ShowToolbar "Ribbon", acToolbarNo
Application.SetOption "Show Status Bar", False
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.RunCommand acCmdWindowHide
Me.Visible = False
End If
The way I found a couple of years ago is pretty easy.
To hide the Navigation Pane via VBA:
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.RunCommand acCmdWindowHide
To unhide the Navigation Pane via VBA:
DoCmd.SelectObject acTable, , True
Quick, easy, and gets the job done!
Jeff