How to find out which SQL Server tables are associated with MS Access?

I inherited the MS Access interface that linked tables with SQL Server. The names of linked tables in MS Access do not match the names of tables in SQL Server. How to find out which SQL Server tables are really associated with MS Access? Also, if I didn’t know which SQL Sever linked tables are attached to, how can I find out?

+8
sql sql-server ms-access
source share
1 answer

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

CurrentDB.TableDefs("dbo_table_name").SourceTableName CurrentDB.TableDefs("dbo_table_name").Connect 

or

 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 Next 
+7
source share

All Articles