Copy Linked Access Tables to Local Tables with VBA

Access or E

New member
Local time
Today, 16:27
Joined
Aug 29, 2022
Messages
12
I have an MS Access database with linked network tables that I need to copy to local tables into a new database along with the front end using VBA. How would I go about doing this? Would the TransferDatabase method be the best way? Thanks in advance for advice.
 
DoCmd.SelectObject acTable, YourTableName, True
DoCmd.RunCommand acCmdConvertLinkedTableToLocal
 
into a new database
Use extApp.DoCmd.TransferDatabase ... (after creating this new database).
In addition to the structure and data, the indices are also transferred.
extApp must be the reference to the Application object of one of the two backends.
 
When I try the DoCmd.RunCommand acCmdConvertLinkedTableToLocal it throws a runtime error message 2046.

1674740582835.png
 
You can also right click any linked table and select the option to convert to local table
 
I know this thread is old, but I get the same error when running the code - but it works ok if i step through the code using F8.
 

Users who are viewing this thread

Back
Top Bottom