Docmd.TransferSharePointList seems to always make the Navigation Pane Visible

Dystonia

Access 2002, 2010, 2016
Local time
Today, 22:13
Joined
Nov 11, 2017
Messages
22
Just in case any of you clever people has had this issue and found an elegant solution

I have written a classic FE/BE networked system where FE users all have an ACCDE file which has all of its shortcut keys disabled, the Navigation Pane hidden and a unique ribbon provided. This prevents anyone trying to look under the bonnet of the FE

However, I have noticed that when docmd.TransferSharePointList is run, the Navigation Pane automatically springs into life revealing all the hidden secrets of the FE

My inelegant workaround is to stop the screen from refreshing, hide all visible forms, re-hide the navigation pane, make all forms visible again before turning screen refresh back on however this still causes a noticeable flicker

Anyone aware if there is a better solution ?

This issue is happening in Access 365, W10 32-bit, W11 32-bit, W11-64bit
 
Can you tell us exactly what is going on/what you are doing when you run this command, or even better, share your complete code?
 
The background is that the SharePoint site at our company requires some meta fields to be populated, so that files stored in a central repository appear on correct site pages and are also sorted in a certain manner.

I posted an article back in 2017 about how to upload files to SharePoint and set meta data using ActiveX objects however as the latter are now now on death row, I am looking for a future proof method of setting SharePoint meta data

The code below will download a SharePoint List of the files in the Central repository into a linked Access table called "SP" so relevant meta fields can be bulk populated by some SQL. Once the linked table is refreshed, meta data will be automatically updated in the SharePoint Central Repository

Code:
Rem*******************************************
Rem 2024.09.09.01 Open Link To Central Repository
Rem*******************************************
      
    Application.Echo False 'STOP SCREEN UPDATING
    
    If ViewGUID = "" Then
       DoCmd.TransferSharePointList acLinkSharePointList, DeptURL, PageGUID, , "SP"  '
    Else
        DoCmd.TransferSharePointList acLinkSharePointList, DeptURL, PageGUID, ViewGUID, "SP" 
    End If
    
    'UP TO THIS POINT THE NAVIGATION PANE WAS HIDDEN BUT NOW IS IS VISIBLE TO ALL

    DoEvents
  
Rem*******************************************
Rem 2024.09.09.01 Navigation Pane Will Have opened automatically and up to Two Forms could be visible
Rem*******************************************
                
    [_Code].ClosePleaseWaitForm 'THIS IS A PROGRESS METER WHICH NEEDS UNIQUE CODE TO CLOSE IT (IF IT IS OPEN)
    
    Dim AF As Form

    Set AF = Screen.ActiveForm
    
    AF.Visible = False
    
    Call DoCmd.RunCommand(acCmdWindowHide) 'HIDE NAVIGATION WINDOW AS IT WILL BE THE ONLY THING LEFT IN VIEW

    AF.Visible = True  'REOPEN LAST FORM

    Application.Echo True 'TURN SCREEN UPDATING BACK ON
 
Thanks for the code. I was wondering if a complete import/link was necessary instead of a simple link refresh. Given your code, you are obviously knowledgeable so please excuse any questions that may seem condescending.

If the list schema is not being changed, then I am certain that an import (TransferSharePointList) or and relink is unnecessary. Once the list is linked, it behaves like any other table in Access would. Am I missing something?

I realize this doesn't answer your question, but if the process can be avoided, then that would keep it from happening.
 
I have to ask....
Wouldn't the second transfer command work just as well if ViewGUID was a ZLS ?
 
Thanks for the code. I was wondering if a complete import/link was necessary instead of a simple link refresh. Given your code, you are obviously knowledgeable so please excuse any questions that may seem condescending.

If the list schema is not being changed, then I am certain that an import (TransferSharePointList) or and relink is unnecessary. Once the list is linked, it behaves like any other table in Access would. Am I missing something?

I realize this doesn't answer your question, but if the process can be avoided, then that would keep it from happening.
Thanks nautical gent

Unfortunately we have some departments which don't use the central depositary which means my FE has to have the ability to switch between URL locations so maintaining a persistant SharePoint link isn't possible as different meta fields are involved

If Microsoft weren't winding up support for ActiveX components , I would continue to use the code I posted back in 2017
 
Last edited:
I have to ask....
Wouldn't the second transfer command work just as well if ViewGUID was a ZLS ?
Thanks Gasman, you are correct....it has obviously been too long since I programmed on a Commodore 64 where every byte counted, so I will make the code less profligate when I get back from holiday
 
Just in case any of you clever people has had this issue and found an elegant solution

I have written a classic FE/BE networked system where FE users all have an ACCDE file which has all of its shortcut keys disabled, the Navigation Pane hidden and a unique ribbon provided. This prevents anyone trying to look under the bonnet of the FE

However, I have noticed that when docmd.TransferSharePointList is run, the Navigation Pane automatically springs into life revealing all the hidden secrets of the FE

My inelegant workaround is to stop the screen from refreshing, hide all visible forms, re-hide the navigation pane, make all forms visible again before turning screen refresh back on however this still causes a noticeable flicker

Anyone aware if there is a better solution ?

This issue is happening in Access 365, W10 32-bit, W11 32-bit, W11-64bit
Hi
This is a known issue but a workaround is easy ...though not elegant
1. turn off screen updating so you don't see the nav pane appear after running the link
2. link the SP list
3. hide the nav pane again
4. turn on screen updating


Code:
Application.Echo False
    DoCmd.TransferSharePointList acLinkSharePointList, SiteAddress, ListID, ViewID, TableName
    DoCmd.SelectObject acTable, , True
    DoCmd.RunCommand acCmdWindowHide
    Application.Echo True

For me, this links the table without the nav pane showing even briefly
Hope that helps
 

Users who are viewing this thread

Back
Top Bottom