Ever wanted to minimize/close the Navigation Pane/Shutter Bar? Not hide it completely, just make it minimize/close/collapse.
Please share any code you have for this.
2 responses
FMalik10/16/2019 3:04:29 AM
Welcome to YittBox. Thanks for posting this question.
To minimize the navigation pane, but not hide it completely, you can try this code:
DoCmd.NavigateTo "acNavigationCategoryObjectType": DoCmd.Minimize
12/30/2021 5:58:12 PM
If you want to hide navigation pane, use the following VBA:
DoCmd.NavigateTo "acNavigationCategoryObjectType" 'This selects the navigation pane - if already hidden, it will open it
DoCmd.RunCommand acCmdWindowHide 'This hides the navigation pane
Alternatively, you can also do the following VBA:
DoCmd.SelectObject acModule, , True 'This selects the navigation pane - if already hidden, it will open it
DoCmd.RunCommand acCmdWindowHide 'This hides the navigation pane
Please note, this will produce an error if you are using the Runtime version of Access (since the navigation pane is disabled). To work around this, you would have to check the SysCmd(acSysCmdRuntime); something like this:
If SysCmd(acSysCmdRuntime) = False Then
DoCmd.SelectObject acModule, , True
DoCmd.RunCommand acCmdWindowHide
End If
Access – Minimize/Maximize Navigation Pane/Shutter Bar
2 responses