Linking a SharePoint View (1 Viewer)

NauticalGent

Ignore List Poster Boy
Local time
Today, 04:11
Joined
Apr 27, 2015
Messages
6,286
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

Ignore List Poster Boy
Local time
Today, 04:11
Joined
Apr 27, 2015
Messages
6,286
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

Ignore List Poster Boy
Local time
Today, 04:11
Joined
Apr 27, 2015
Messages
6,286
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.
 

tmaccabe

New member
Local time
Today, 01:11
Joined
Oct 13, 2023
Messages
26
Hello. I was so excited to learn I could link to a view, but then I discovered that Access can only cache one version of a list at a time, so it caches the last view that was linked or re-linked. You can't have multiple views of the same list with different filters linked (and cached) at the same time. And, turning off caching on a long list is bad. Bummer. Still, linking to a single filtered view is sometimes all you need.
 

Users who are viewing this thread

Top Bottom