Take the 2-minute tour ×

I inherited a MS Access front-end that has linked tables to SQL Server. The linked table names in MS Access do not match the table names in SQL Server. How can I find out what SQL server tables are actually linked to MS Access? Also, if I didn't know what SQL Sever the linked tables were connected to, how could I find that out?

share|improve this question
add comment

1 Answer

up vote 7 down vote accepted

You can use the tabledefs collection to check the connect property and the source table name.



Dim tdf As TableDef
Dim db As Database

    Set db = CurrentDb

    For Each tdf In CurrentDb.TableDefs
        If tdf.Connect <> vbNullString Then
           Debug.Print tdf.Name; " -- "; tdf.SourceTableName; " -- "; tdf.Connect
        End If
share|improve this answer
Thanks! This worked, but is there a way to also list the name of the MS Access link too? Now that I have the SQL Server table names, I'm not sure what it is actually linked to in MS Access, since their names do not match. –  Tuan May 17 '12 at 14:59
That would be the name of the tabledef. I have edited. –  Remou May 17 '12 at 15:05
add comment

Your Answer


