Hello all,
I have a front-end and back-end part of a database. In order to make updates to the front-end, i have a local copy of the back-end on my machine. This makes it much quicker to design. Once i make the design changes, i relink the front-end to the network back-end. This relinking takes forever. Ok that's not fair, it takes about 4 minutes. These 4 minutes drive me crazy.
In order to make this faster, i created a routine to switching between the Local and Network copies of the back-end. It runs just as slowly as the manual relinking does.
Code:
Function relinkTables()
Dim tdf As DAO.TableDef
Dim db As Database
Set db = CurrentDb
For Each tdf In CurrentDb.TableDefs
' check if table is a linked table
If Len(tdf.Connect) > 0 Then
If (tdf.Connect = ";DATABASE=C:\Users\Repository.accdb") Then
tdf.Connect = ";DATABASE=\\XXX.Repository.accdb"
Else
tdf.Connect = ";DATABASE=C:\Users\Repository.accdb"
End If
tdf.RefreshLink
End If
Next
End Function
The part of the code that takes most of the time is tdf.refreshlink. Is there a fast way of doing this, or am i stuck because of my slow network?
Thank you,
Chris