AUALZ 0 Newbie Poster

Hi, Does anyone know how I can get the file name for the linked tables?
I have linked the tables and renamed them. I am able to get the renamed name shown on table tab, but not the actual FILE NAME that i originaly linked the table.
I am using the following code: (I will get the path and the linked(renamed) name but not the File name)

Function fGetLinkedTables() As Collection
'Returns all linked tables except tblAlarmMasterBookedOut
Dim collTables As New Collection
Dim tdf As TableDef, db As Database
Set db = CurrentDb
db.TableDefs.Refresh

For Each tdf In db.TableDefs
 With tdf
  If Len(.Connect) > 0 Then
     If Left$(.Connect, 4) = "ODBC" Then
         collTables.Add Item:=.Name & ";" & .Connect, KEY:=.Name
   'ODBC Reconnect handled separately
     Else
      If .Name <> "tblAlarmMasterBookedOut" Then
              collTables.Add Item:=.Name & .Connect, Key:=.Name
      End If
    End If
  End If
 End With
Next
Set fGetLinkedTables = collTables
Set collTables = Nothing
Set tdf = Nothing
Set db = Nothing
End Function
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.