Want To Do A Re-Link All My Tables Within A Macro

  • Thread starter Thread starter Jim Hill
  • Start date Start date
J

Jim Hill

I do a copy command within a batch program to make a copy
of 5 databases which are all linked together.

I then want to re-link all of them to each other in the
new location.

I know how to do it manually with the Linked Table
Manager, but I need it to happen every night.

ANy ideas???

Jim
 
I don't think you'll be able to do it using a macro, but you can with a VBA
module.

Start by looking at http://www.mvps.org/access/tables/tbl0009.htm at "The
Access Web". You'll have to remove at least:


strMsg = "Do you wish to specify a different path for the Access
Tables?"

If MsgBox(strMsg, vbQuestion + vbYesNo, "Alternate data source...") =
vbYes Then
strNewPath = fGetMDBName("Please select a new datasource")
Else
strNewPath = vbNullString
End If

and replace it with code that sets strNewPath to whatever it is you want to
change the connections to. (If you're doing this in batch, doubtlessly
there's other User Interface components you'll need to eliminate or change)
 
Back
Top