Right click on table to open the table link manager.
Or use code to set links. Recommend UNC pathing. Here is what I use:
Code:
Public Sub NormalizeTableLinks()
'Relink tables with UNC pathing
'Use the variables provided to do the manipulations desired
Dim td As TableDef
Dim db As DAO.Database
Dim strOld As String
Dim strNew As String
'replace the following strings as needed
strOld = "R:\Lab\Database\Data\LabData.accdb"
strNew = gstrBasePath & "Data\LabData.accdb"
Set db = CurrentDb
For Each td In db.TableDefs
If InStr(td.Connect, strOld) > 0 Then
Debug.Print td.Name
Debug.Print "Old Link: " & td.Connect
td.Connect = Replace(td.Connect, strOld, strNew)
td.RefreshLink
Debug.Print "New Link: " & td.Connect
End If
Next td
db.TableDefs.Refresh
End Sub
gstrBasePath is a global constant declared in a general module header. The path string is in the form: \\servername\path\