Linking a SharePoint View (1 Viewer)

NauticalGent

CopyPaster of the First Order
Local time
Today, 08:30
Joined
Apr 27, 2015
Messages
5,147
Using code I found here, I have used the following code to Link a SharePoint View in Access:

Code:
DoCmd.TransferSharePointList acLinkSharePointList, "http:\serversite", _
"{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}", _ 'Sharepoint List GUID
"{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}", _ 'SharePoint View GUID
"tblMyList", True

This code has worked for me the past when I was using AC2010 (unsure which version of SP I was using). I am currently using Access Microsoft 365 MSO (Version 2202 Build 16.0.14931.20128) 64-bit and SharePoint Online and the code above does not work.

By does not work, I mean the code executes with no errors but it does not link the view.

Any ideas?

I cross posted this on StackOverflow as well: https://stackoverflow.com/questions/71766818/linking-a-sharepoint-view-in-ms-access
 

NauticalGent

CopyPaster of the First Order
Local time
Today, 08:30
Joined
Apr 27, 2015
Messages
5,147
25 views in both forums and nary a response...did my deodorant fail??!?

I even sent the author of that article and message and zilch - and so it goes. The ability has either been deprecated or the code needs to be updated. The world may never know...
 

NauticalGent

CopyPaster of the First Order
Local time
Today, 08:30
Joined
Apr 27, 2015
Messages
5,147
And I stumbled across the answer. In one of the comments, the author answered a question:

The hard part is that URLs for lists can vary depending on whether you are using a company’s SharePoint server or a hosted SharePoint, how it is placed in the overall structure and other factors. Also, consider that you have sufficient permissions to actually view the required page. If you are not an administrator, you may need to ask whoever administrate the site to tell you the GUID for the list.

Assuming you have sufficient permissions, here’s a way to find out:

1) Open your web browser
2) Use the following URL:

//_layouts/viewlsts.aspx

replacing the with your SharePoint’s domain and with the complete path to the site that contains the list you need. As an example, suppose you have a Office 365 site, it may look something like this:

https://mycompanyname.sharepoint.com/sites/mysite/_layouts/viewlsts.aspx

Once I amended my path name with the /_layouts/viewlists.aspx, everything linked up perfectly.
 

Users who are viewing this thread

Top Bottom