I have an Excel Macro which extracts data from another file, then reformats said data, and finally adds said data to an Access database file as new records. My script works perfectly with regards to a traditional desktop .accdb Access database file, but I am looking to transition to a SharePoint Access Web App.
Currently, my Excel VBA script looks something like this:
dbPath = "C:\Some\Path\MyDatabase.accdb"
Set wsDAO = DBEngine.Workspaces(0)
Set dbDAO = wsDAO.OpenDatabase(dbPath)
Set rsDAO = dbDAO.OpenRecordset(TableName)
RecordCount = UBound(ExportValues)
FieldCount = rsDAO.Fields.Count
ReDim ExportArray(1 To RecordCount, 1 To n)
For r = 1 To RecordCount
ExportArray(r, 1) = Stuff
.
.
.
ExportArray(r, n) = StuffN
Next r
For records = 1 To RecordCount
If records = 1 Then
rsDAO.AddNew
Else
rsDAO.Update
rsDAO.AddNew
End If
For n = 1 To FieldCount - 1
rsDAO.Fields(n).Value = ExportArray(records, n)
Next n
Next records
rsDAO.Update
rsDAO.Close
dbDAO.Close
How can I modify this to access and update an Access Web App? I have no idea where to start. I've looked all around, but haven't been able to find any good information, especially given the new SharePoint that was recently rolled out by Microsoft. Thanks!