Created
February 17, 2014 16:58
-
-
Save JamesSkemp/9054503 to your computer and use it in GitHub Desktop.
Module for Microsoft Visual Basic for Applications (specifically Access) that provides various developer functions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Compare Database | |
Option Explicit | |
' Dumps connection data for all ODBC/linked tables. | |
Function DumpConnectionData() As Boolean | |
Dim db As DAO.Database | |
Dim tb As DAO.TableDef | |
Set db = CurrentDb | |
For Each tb In db.TableDefs | |
' Skip system files. | |
If (Mid(tb.Name, 1, 4) <> "MSys" And Mid(tb.Name, 1, 4) <> "~TMP" And Mid(tb.Connect, 1, 5) = "ODBC;") Then | |
Debug.Print (tb.Name) | |
Debug.Print (tb.Connect) | |
Debug.Print ("===") | |
End If | |
Next tb | |
Debug.Print ("=== === ===") | |
Set db = Nothing | |
DumpConnectionData = True | |
Exit Function | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment