Hi,
I have a small database working fine from a fileshare but have been asked to migrate this to SharePoint. I've uploaded my tables to SharePoint lists without many problems.
If I append single records from my dataset they synchronise fine. I have a button to import multiple lines from an excel file and here is where I'm having issues. When running this code I seemingly lose connection to the sharepoint list and the records are input locally showing negative ID's. I get the option to synchronise with the sharepoint list but I don't want the users of the DB to have to do this everytime.
I have a constant network connection and don't have any dropout so not sure why this is happening. Is there a command I can add onto the end to force synchornisation?
I have a small database working fine from a fileshare but have been asked to migrate this to SharePoint. I've uploaded my tables to SharePoint lists without many problems.
If I append single records from my dataset they synchronise fine. I have a button to import multiple lines from an excel file and here is where I'm having issues. When running this code I seemingly lose connection to the sharepoint list and the records are input locally showing negative ID's. I get the option to synchronise with the sharepoint list but I don't want the users of the DB to have to do this everytime.
I have a constant network connection and don't have any dropout so not sure why this is happening. Is there a command I can add onto the end to force synchornisation?
Code:
DoCmd.SetWarnings (Warningsoff)
If fosusername.Value = "SMoore" Or fosusername.Value = "mdexter" Or fosusername.Value = "SSebastian" Or fosusername.Value = "IKeech" Then
On Error GoTo HandleError
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, _
"Exceptions", "https://SharePointFileLocation/Import.xlsx", True
HandleExit:
Exit Sub
HandleError:
MsgBox Err.Description
Resume HandleExit
Else
MsgBox ("You are not authorised to import. Please contact mdex with any issues.")
End If
Me.[subform1].Form.Requery
Me.[subform2].Form.Requery
DoCmd.SetWarnings (Warningson)
Me.Form.Refresh