Unanswered: Want to eliminate dsn and come back to normal tables
I have an MS access database that has related tables using a dsn connection to an sql server. I need to change those relations to link the tables back to an ms access database. (please see attachment) How can I proceed?
In the Access Database window, delete the linked tables (select by clicking on the name then hit de Felete key), then in the File menu select 'Get External Data' --> 'Link Tables'. In the common dialog box that opens, select the database containing the table. When the 'Link Tables' window opens, select the tables and click OK.
This can also be done by program, using the Connect property of a TableDef object representing the table in the Tabledefs collection of the CurrentDb object:
Dim dbs As DAO.Database
Dim tdf As DAO.TableDef
Set dbs = CurrentDb
Set tdf = dbs.TableDefs("Table_Name")
For a linked Access table this property looks like:
;DATABASE=C:\Documents and Settings\SinnDHo\My documents\Access\dBForum\ArchiveDatabase.mdb