|
|
Linked Tables' ReportQuestionDoes anyone remember the code that produce a report for linked tables? I would like to know the source of the links. AnswerIvon, 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
Copyright © 1999-2008 by Shamil Salakhetdinov. Original version is published here. All rights reserved. |