0

I have a task to move linked tables to another network drive. There are 13 stores and each store uses its own database as using the code how can re-link the tables to a specific database.

Thanks

Ignasijus
  • 11
  • 1
  • Each store has its own copy of same frontend or each has their own unique frontend? If the first, could just use the Linked Table Manager to set new links then redistribute frontend to users; if the latter each will have to use Linked Table Manager to set new links. – June7 Oct 04 '21 at 18:06
  • Each store have own unique. With "Linked Table Manager" it's hard because there is around 70 tables and each using differend database – Ignasijus Oct 04 '21 at 18:11
  • VBA can change link paths (https://stackoverflow.com/questions/36899011/ms-access-link-table-with-vba) and VBScript can connect to and manipulate Access file (https://stackoverflow.com/questions/40999718/how-to-run-access-event-procedure-from-vb-script-after-form-open). Might be able to build a script (VBScript, PowerShell, etc) that could connect to and open each file and modify links. Not something I've ever tried. – June7 Oct 04 '21 at 18:13
  • I'm trying to use this code (https://www.excelsirji.com/vba-code-to-re-link-ms-access-link-tables/) but when code found a database where is in different location i got a error – Ignasijus Oct 04 '21 at 19:33
  • Maybe there some fix where skip that tables then check next table? – Ignasijus Oct 04 '21 at 19:36
  • How would you expect that code to work if each table link points to a different db? Don't have to loop tables. Can specify table name(s) and set each link. Means would have to know all 70+ table names and hard code with new link for each table. – June7 Oct 04 '21 at 20:34
  • Use the standard VBA re-linking code, as shown in the many examples, but examine each link to get the existing database name, and modify the link to connect to the correct database. Modify your question to show the code you are using. – david Oct 05 '21 at 00:32

0 Answers0