リンクテーブルにも以下のような区別があります。
TableDefAttributeEnum.dbAttachedODBC
MS SQLServer など、ODBC を使うリンクテーブルTableDefAttributeEnum.dbAttachedTable
MS Access などの非ODBCのリンクテーブル
リンクテーブルの一覧を表示するサンプル
Dim TableDef As DAO.TableDef
For Each TableDef In CurrentDb.TableDefs
If TableDef.Attributes And (TableDefAttributeEnum.dbAttachedODBC Or TableDefAttributeEnum.dbAttachedTable) Then
' ODBC および 非ODBCリンクテーブル の場合
Debug.Print TableDef.Name
End If
Next特定のリンクテーブルのみ抽出する場合は、条件式を以下のようにします。If TableDef.Attributes And TableDefAttributeEnum.dbAttachedODBC Then
' MS SQLServer など(ODBCリンクテーブル)の場合
End If
If TableDef.Attributes And TableDefAttributeEnum.dbAttachedTable Then
' MS Access など(非ODBCリンクテーブル)の場合
End If関連する資料のリンク
TableDefAttributeEnum 列挙 (DAO)
http://msdn.microsoft.com/ja-jp/library/office/ff194433.aspx