我正在运行此语法,以将3个SharePoint表作为本地表链接到我的Access数据库中,并且效果很好!我决定更进一步,运行相同的语法,但是将语法从 acImportSharePointList。 acLinkSharePointList
,结果与预期不符。例如,我要链接3个列表(其中3个为本地链接,3个为链接链接),其名称分别为Tracking,SN,Accounts,这是我的语法
Public Sub LinkSPTables()
DoCmd.TransferSharePointList acImportSharePointList, "Sharepoint site", "List ID", "View ID", "Tracking", False
DoCmd.TransferSharePointList acImportSharePointList, "Sharepoint site", "List ID", "View ID", "SN", False
DoCmd.TransferSharePointList acImportSharePointList, "Sharepoint site", "List ID", "View ID", "Accounts", False
DoCmd.TransferSharePointList acLinkSharePointList, "Sharepoint site", "List ID", "View ID", "Tracking_SP", False
DoCmd.TransferSharePointList acLinkSharePointList, "Sharepoint site", "List ID", "View ID", "Accounts_SP", False
DoCmd.TransferSharePointList acLinkSharePointList, "Sharepoint site", "List ID", "View ID", "SN_SP", False
End Sub
现在我的问题是本地副本完全符合我的期望。但是,当我开始使用LINKSharePointList Tracking_SP链接完美地链接表时,我得到了Accounts1,SN1以及我不想链接的其他3个表-名为:UI,Agency,Clientel
为什么LinkSharePoint提取不需要的表?
(是的,在我的生产代码中,我有一个有效的URL,列表ID和视图ID)