Broken links due to server name changes........

J

J Hotch

Hi there

we will soon be moving our file servers and renaming them, as well as
changing user drive mappings in our domain. as a result any links in files
(including macros, linked tables etc) referring to other files
elsewhere, will break (note that SQL look-ups/ links wont break). is there
any way/ software that people know of that
can scan for and report.... maybe help fix too, these broken links?

Many thanks for any help.
 
K

Klatuu

All you really need to do is to use the Linked Table Manager (Tools->Database
Utilities->Linked Table Manager) and relink your tables to the new server
name. I notice you mentioin macros, but are you referencing macros in the
back end database?
You can write or possibly find with a Google search, code that does the
relink. It is faster to do it that way.
 
J

J Hotch

Thanks for the imput Klatuu, the only problem is that there are hundreds of
files, and many of them contain hundreds of linked tables....... a hugly time
consuming process to do this manually.

many thanks
 
K

Klatuu

Okay, I have a relink routine somewhere in my bag of tricks. I'm in the
middle of something at the moment. Later today I can post back with it.
 
K

Klatuu

My apologies for taking so long to get back, but I did find it:

Private Function ReLink(strNewPath As String) As Boolean
Dim dbs As Database
Dim tdf As TableDef
Dim intCount As Integer
Dim frmCurrentForm As Form

DoCmd.Hourglass True
On Error GoTo ErrLinkUpExit
Me.lblMsg.Visible = True
Me.cmdOK.Enabled = False

Set dbs = CurrentDb

For intCount = 0 To dbs.TableDefs.Count - 1
Set tdf = dbs.TableDefs(intCount)
If tdf.Connect <> "" Then
Me.lblMsg.Caption = "Refreshing " & tdf.NAME
DoEvents
tdf.Connect = ";DATABASE=" & strNewPath
tdf.RefreshLink
End If ' tdf.Connect <> ""
Next intCount
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top