title: getting linked table path with tabledef.connect
body: <p>I have been trying to get the path to a linked table. I am looping thru the tables. it works one the first loop but not on the 2nd loop. it returns "".</p>
  
  <p>Ive tried several different ways, calling the table by name or by number. the code originally comes from Neville Turbit. Neville's code calls the table by name, but I could not get that to work.</p>
  
  <pre><code>Public Function GetLinkedDBName(TableName As String)
  
  Dim tblTable As TableDef
  Dim strReturn As String
  Dim i As Integer
  
  On Error GoTo Error_NoTable ' Handles table not found
  
  '---------------------------------------------------------------
  '
  i = 0
  On Error GoTo Error_GetLinkedDBName ' Normal error handling
  
  For Each tblTable In db.TableDefs
      If tblTable.Name = TableName Then
          strReturn = tblTable.Connect
  
          strReturn = db.TableDefs(i).Connect
          Exit For
      End If
      i = i + 1
      Next tblTable
  </code></pre>