LINKING AND UNLINKING TABLES THROUGH VBA

Various methods are available to link tables manually and automatically. In the following sections, you see how to link a back end, based on it being in the current folder or in another folder.

Note

To see how to check for and re-create a connection between an ADP and SQL Server, check out Chapter 25, “Developing SQL Server Projects Using ADPs.”

Linking and Unlinking Tables in a Jet Back End Located in the Application's Folder

In section 4, the ap_AppInit() function checks to see whether the back-end database is in the same folder as the front end and, if so, links the tables automatically.

 '-- Section 4: If the Data MDB is found in the App Directory, '-- link the files. If Dir(pstrAppPath & "\" & pstrBackEndName) ...

Get F. Scott Barker's Microsoft® Access 2000 Power Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.