UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Custom Search
Edit Discussion
> HideNavigationPane    


Synopsis

Hide or Display Navigation Pane (Database Window). This function provides a convenient wrapper that runs the command acCmdWindowHide

CODE
' HideNavigationPane
' http://www.utteraccess.com/wiki/HideNavigationPane
' Code courtesy of UtterAccess Wiki
' Licensed under Creative Commons License
' http://creativecommons.org/licenses/by-sa/3.0/
'
' You are free to use this code in any application,
' provided this notice is left unchanged.
'
' rev  date                          brief descripton
' 1.0  2011-03-06                    
'
Public Function HideDbWindow(bHide As Boolean) As Boolean
'***************************************************************************************
' Procedure : HideDbWindow
' Purpose   : hide or display the database window (Access 97-2003) or Navigation Pane (Access 2007, 2010)
' Returns   : Boolean
'***************************************************************************************
'

   Dim bResult As Boolean


  On Error GoTo HideDbWindow_Error
   
   If bHide Then
       DoCmd.NavigateTo "acNavigationCategoryObjectType"
       DoCmd.RunCommand acCmdWindowHide
   Else
       DoCmd.SelectObject acTable, , True
   End If
   
   bResult = True

   HideDbWindow = bResult

HideDbWindow_Exit:
  On Error GoTo 0
  Exit Function

HideDbWindow_Error:

   MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure HideDbWindow of Module basFormManagement"
   HideDbWindow = False

Resume HideDbWindow_Exit


End Function

Creative Commons License
HideNavigationPane by UtterAccess Wiki is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Editing and revision of the content is freely encouraged; for details, see Expected Usage.

Edit Discussion
Custom Search
Thank you for your support!
This page has been accessed 6,507 times.  This page was last modified 12:33, 6 May 2014 by Blacksmith. Contributions by Jack Leach and Glenn Lloyd  Disclaimers