2015-02-24 45 views
0

我有一個Access 2010工具,我創建了一些鏈接到一些SharePoint列表。這個解決方案工作正常,直到我的最終用戶決定他們需要更多的People/Group字段,這使我們超過了查詢的查看閾值。我無法進入中央行政部門,所以這是一個難關。所以我決定,我可以鏈接到三個視圖,並通過查詢加入數據,所有數據都應該很好。爲了能夠鏈接到SharePoint列表視圖,您必須使用DoCmd.TransferSharePointList,而不是使用「外部數據」選項。外部數據鏈接到整個表,因此閾值可防止返回數據。VBA DoCmd.TransferSharePointList不鏈接

我需要鏈接到三個意見,使我的代碼是:

Function SPVLink() 

DoCmd.TransferSharePointList acLinkSharePointList, "http://server/sites/sitename/", "{94E4E5D3-77C8-4170-BBA2-3F9533C24627}", "{CF2A3189-B45B-4527-A4F3-CF323C9E7E21}", "IssueTracker0", True 
DoCmd.TransferSharePointList acLinkSharePointList, "http://server/sites/sitename/", "{94E4E5D3-77C8-4170-BBA2-3F9533C24627}", "{C6C7ABBA-C159-400F-8402-F6B56954BA5C}", "IssueTracker1", True 
DoCmd.TransferSharePointList acLinkSharePointList, "http://server/sites/sitename/", "{94E4E5D3-77C8-4170-BBA2-3F9533C24627}", "{290947AD-8BC4-4610-82C1-E636CFBBF06C}", "IssueTracker2", False 

End Function 

這不運行但是卻沒有生成鏈接視圖錯誤。我也試着把它作爲一個宏來運行,結果是一樣的,它運行時沒有錯誤,但沒有創建鏈接。我做了一些搜索,但沒有發現這種問題。

任何幫助將不勝感激。

回答

0

VBA中的DoCmd.TransferSharePointList不會讓您鏈接到多個視圖。

acLinkSharePointList將鏈接到整個列表,如外部數據一樣。

acImportSharePointList將讓您只導入相關視圖中顯示的數據。

因爲數據庫已經鏈接到列表,它不會創建具有不同名稱的新鏈接。