Reputation: 3
I wanted to basically copy the entire content of one table to another.
Context:
I need to just copy the data directly. So far, the only code I found is
DoCmd.TransferDatabase
but I can't seem to configure it correctly.
Upvotes: 0
Views: 572
Reputation: 56026
Simplest method is probably to run a make-table query to (re)create the local table:
Dim Sql As String
Sql = "SELECT * INTO LocalTable FROM SharePointTable;"
CurrentDb.Execute Sql
That will pop a warning, though. If that is too much, create the local table, then run two queries - the first to delete all records from the local table, the second to append all records from the SharePoint table to the local table.
Upvotes: 1