I have an Access application that needs to perform some
initialisation
and data synchronisation with some sharepoint lists. I have a splash
screen that displays progress, but it is proving impossible to keep
the navigation pane hidden whilst the synchronisation runs - even
though the database has the show navaigation check box unchecked.
The problem seems to be when a DoCmd.TransferSharePointList
acLinkSharePointList,"http:...." command is executed.
As this statement completes execution, the navigation pane appears
and
the splash screen loses focus. I am unable to hide the navigation
screen so it then spoils the user interface for the rest of the
application - and I don't want users to access it anyway.
How can I stop it appearing or if not, how can I hide it again
programmatically.
Thanks
Andrew
Returns True if the Access Navigation Pane or Database Window is visible,
otherwise False.
' Example: ?isDbWindowVisible()
Public Function isDbWindowVisible() As Boolean
Dim hWindow As Long
If Int(SysCmd(acSysCmdAccessVer)) >= 12 Then ' Access 2007 Navigation
Pane
hWindow = FindWindowEx(Application.hWndAccessApp, 0,
hWindow = FindWindowEx(hWindow, 0, "NetUIHWND", vbNullString)
Else ' Access 20003 Database Window
hWindow = FindWindowEx(Application.hWndAccessApp, 0, "MDIClient",
vbNullString)
hWindow = FindWindowEx(hWindow, 0, "Odb", vbNullString)
End If
isDbWindowVisible = (isWindowVisible(hWindow) <> 0)
End Function
The above code can be used to hide the Navigation Pane such as in the
function below:
' Hide the Access Database Window or Navigation Pane.
' Example: DbWindowHide
Function DbWindowHide() As Boolean
If isDbWindowVisible() Then
Application.Echo False
Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
"agf" <agfer...@googlemail.com> wrote in message
news:e236a63f-5de3-4e30...@s15g2000yqs.googlegroups.com...