Russellbrown
asked on
MS Access Linked Table to SharePoint - Broken Link
I am able to link lists in SharePoint to MS Access programmatically with VBA. Extract of the code as follows:
In the MS Access DB, the linked table, List5 – the link would have been broken as it was pointing to a GUID that has been deleted.
My questions: How can I programmatically ( using VBA in MS Access)
1. test in the case of List5, whether the link is broken ( or its equivalent ),
2. And if the link is broken, how to delete the linked table, List5 in the MS Access DB.
Thank you in advance for your assistance.
Dim GUID, AccountChoice As String
ListChoice = [ ] ' the VBA code can grab the ListChoice
GUID = [ ] ‘ the VBA code can grab the GUID
DoCmd.TransferDatabase acLink, "WSS", "WSS;HDR=NO;IMEX=2;DATABAS E=serverna me/;LIST=" & GUID & ";VIEW=;RetrieveIds=Yes;TA BLE=" & ListChoice, acTable, , ListChoice
Assuming 5 lists have been created in SharePoint and linked to MS Access ( i.e. List1, List2, List3, List4 and List5 ). Somewhere down the road, List5 is deleted in SharePoint and is re-created with the same name ( but now with a new GUID ). ListChoice = [ ] ' the VBA code can grab the ListChoice
GUID = [ ] ‘ the VBA code can grab the GUID
DoCmd.TransferDatabase acLink, "WSS", "WSS;HDR=NO;IMEX=2;DATABAS
In the MS Access DB, the linked table, List5 – the link would have been broken as it was pointing to a GUID that has been deleted.
My questions: How can I programmatically ( using VBA in MS Access)
1. test in the case of List5, whether the link is broken ( or its equivalent ),
2. And if the link is broken, how to delete the linked table, List5 in the MS Access DB.
Thank you in advance for your assistance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.