Updating Linked Tables in Access 2007 via VBA: 4


/ Published in: VB.NET
Save to your folder(s)



Copy this code and paste it in your HTML
  1. Dim externalDB as Database
  2. Dim tDef As TableDef
  3. Set externalDB = OpenDatabase("C:\path\to\your\database.accdb")
  4. For Each tDef In externalDB.TableDefs
  5. If tDef.Connect <> "" Then
  6. tDef.Connect = connectionString
  7. tDef.RefreshLink
  8. End If
  9. Next tDef
  10. externalDB.Close

URL: http://blog.loxotech.com/?p=67

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.