Access
How to Manage Your Linked Tables
- Details
- Category: Split Database Split Database
- Last Updated: 13 September 2020 13 September 2020
Once you have learned how important it is to Split your Access database into application and data you will need to become very good at managing your linked tables. This is important if you want to be able to switch to a different back end. I am regularly switching between live data (back end) and test data (back end). You will also need to manage your linked tables if you move your current back end to a new location. When you move your back end or want to switch to a different back end you must tell Access when to find the back end you want to use. Access does not automatically locate the back end for you.
When you create a linked table Access stores the full pathname to the back end database for each table. When you need to switch to a different back end location you must do one of the following:
1) Delete all the linked tables. Recreate the linked tables.
2) Use the Linked Table Manager to change the currently linked tables to a new location.
3) Use VBA code to relink the tables. You could automatically relink the table to a known location. You could also
provide a File browser dialog to allow the user to locate the backend.
Relinking tables in Runtime Mode
One of the issues with using the Access Runtime is how to provide an option for a user to select the location of the back end. I normally use my own custom Link Table Manager using VBA code to handle the relinking.
VBA Code for relinking your tables:
Boiler Plate Database - By the Utter Angel - includes table reattachment
ReLinker: multi-BE, Label Table Description to show Connect info - UtterAccess.com
Relink / Swap Between LIVE, TEST and LOCAL Data - UtterAccess.com
Reconnect Attached tables on Start-up - by Peter Vukovic
Relink Access tables from code - by Dev Ashish
Additional Articles and Resources:
Get Back End database Location - VBA code