Skip to content

Instantly share code, notes, and snippets.

@JamesSkemp
Created February 17, 2014 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JamesSkemp/9054503 to your computer and use it in GitHub Desktop.
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.
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