Access Linked Table Path Correction
by Yalin Meric (3 Submissions)
Category: Microsoft Office Apps/VBA
Compatability: Visual Basic 5.0
Date Added: Wed 3rd February 2021
Rating: (5 Votes)
When the folder of an access application and its linked table source changes, this code will modify the linked tables to comply.
In order that code to work the Access application and the linked table source file must be in the same directory. Also the user running the application must have the permission to modify the tables.
Rate Access Linked Table Path Correction
Sub TabloLinkleriniKontrolEt(sSourceFile As String)
Dim daTaban As Database, tbTablo As TableDef
Set daTaban = CurrentDb
For Each tbTablo In daTaban.TableDefs
If InStr(tbTablo.Connect, "DATABASE=") > 0 Then
If tbTablo.Connect <> ";DATABASE=" & Application.CurrentProject.Path & "\" & sSourceFile Then
tbTablo.Connect = ";DATABASE=" & Application.CurrentProject.Path & "\" & sSourceFile
Download this snippet
Add to My Saved Code
Access Linked Table Path Correction Comments
No comments have been posted about Access Linked Table Path Correction. Why not be the first to post a comment about Access Linked Table Path Correction.
Post your comment