Linked Tables' Report


Question

Does anyone remember the code that produce a report for linked tables? I would like to know the source of the links.

Answer

From: Shamil Salakhetdinov <shamil@marta.darts.spb.ru>
To: ACCESS-L <ACCESS-L@PEACH.EASE.LSOFT.COM>
Subject: Re: Linked Table Report
Date: 5 March 1999 13:01

Ivon,

Enclosed code produces a report (debug.print) of linked tables in CurrentDB().

HTH,
Shamil

P.S. The code:

Public Function GetConnectStrsList _
                (ByRef rdbs As DAO.Database) As VBA.Collection
  Dim tdf As DAO.TableDef
  Dim col As New VBA.Collection

  For Each tdf In rdbs.TableDefs
    If tdf.Connect <> "" Then
      On Error Resume Next
        col.Add tdf.Connect, tdf.Connect
      On Error GoTo 0
    End If
  Next

  Set GetConnectStrsList = col
End Function

Sub a_test()
  Dim col As VBA.Collection
  Dim var As Variant

  Set col = GetConnectStrsList(CurrentDb())
  For Each var In col
    Debug.Print var
  Next
End Sub

HOME    TOPICS

Copyright © 1999 by Shamil Salakhetdinov.
All rights reserved. Terms of use.

Last updated: October 10, 2006

Published also here at 4TOPS: Linked Tables Report