DataBase - Navigation Pane Appears when Linking Sharepoint List

Asked By agf
17-Nov-09 02:10 PM
I posted this on microsft.public.access - but this is probably a
better group to post on.

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 do not want users to access it anyway.


How can I stop it appearing or if not, how can I hide it again
programmatically.


Thanks


Andrew
DoCmd.TransferSharePointList
(1)
NetUIHWND
(1)
Application.hWndAccessApp
(1)
Access 2007
(1)
AcLinkSharePointList
(1)
AcSysCmdAccessVer
(1)
MDIClient
(1)
IsDbWindowVisible
(1)
  Jeanette Cunningham replied to agf
17-Nov-09 03:23 PM
Here is some code by Dirk Goldgar MVP, that should do what you want.

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
  zhangkaifeng replied to agf
26-Nov-09 11:30 PM

         
  zhangkaifeng replied to agf
27-Nov-09 04:23 AM

         
Create New Account
help
1- la d?activation du bouton de fermeture de Access ne fonctionne plus?? vHandle = GetSystemMenu(Application.hWndAccessApp, False) vReponse = EnableMenuItem(vHandle, 6, 1025) 2- comment supprimer la barre de menus (Home - Create bouton "niveau inf?rieur"?? merci bcq pour vos r?ponses Access Discussions Windows XP (1) Application.hWndAccessApp (1) Access 2003 (1) Access 2007 (1) XP (1) GetComputerNameA (1) WIDEnableItem (1) GetComputerName (1 Variant Dim vReponse As Variant 'd?activer le bouton de fermeture de ACCESS vHandle = GetSystemMenu(Application.hWndAccessApp, False) vReponse = EnableMenuItem(vHandle, 6, 1025) end sub dans mon module "Mes fonctions" Option Compare
Dokumente nachher aus dem Drucker rauskommen stimmt die Reihenfolge nicht mehr. Hier ein Beispiel: . . . ShellExecute(Application.hWndAccessApp, "Print", "PDF1.pdf", "", "C: \ ", SW_SHOWNORMAL) ShellExecute(Application.hWndAccessApp, "Print", "PDF2.pdf", "", "C: \ ", SW_SHOWNORMAL) ShellExecute(Application.hWndAccessApp, "Print", "PDF3.pdf", "", "C: \ ", SW_SHOWNORMAL) ShellExecute(Application.hWndAccessApp, "Print", "PDF4.pdf", "", "C: \ ", SW_SHOWNORMAL) ShellExecute(Application.hWndAccessApp, "Print", "PDF5.pdf", "", "C: \ ", SW_SHOWNORMAL) . . . Wie zuf
Beschreibung (deutsch) wie man MS-Hilfe Dateien erstellt? - - Mit freundlichen Grüßen Daniel Kobner Access Discussions Application.hWndAccessApp (1) AEKDownloads (1) LngContextID (1) HelpFileName (1) MycontextID (1) HtmlHelpA (1) StrHelpFile (1) HtmlHelp (1 window handle of the created Help window. Select Case MycontextID Case Is = 0 hwndHelp = HtmlHelp(Application.hWndAccessApp, HelpFileName, _ HH_DISPLAY_TOPIC, MycontextID) Case Else hwndHelp = HtmlHelp(Application.hWndAccessApp, HelpFileName, _ HH_HELP_CONTEXT, MycontextID) End Select End Sub - - 8< - - 8< - - 8< - - Diesen Code fügst Du