Hi,
i dont have a sample of such proc around, by idea is simple - you make a
local table, where you list all tables to relink and in other field some
kind of code, showing to which db it should be attached.
then you take a proc to relink tables from www.mvps.org/access and modify it
so it read table list from tis table, and ask new path each time new code
comes with next table.
HTH

Signature
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
>I have a MDB front end which contain sall the forms/queries/macros and
>which
[quoted text clipped - 14 lines]
>
> Anybody got any clues?
There is a module in solutions.mdb (sample database) that checks if the data
is available on startup. If not, it pops up the File Open dialog to let you
locate the data.
Download from:
http://msdn.microsoft.com/library/officedev/bapp2000/mdbdownload.htm

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I have a MDB front end which contain sall the forms/queries/macros and
>which
[quoted text clipped - 14 lines]
>
> Anybody got any clues?
Carol Grismore - 16 Sep 2005 17:36 GMT
Sub AutoReconnect()
Dim db As Database
Dim tdf As TableDef
Dim cnt As String
Dim X As Integer
Dim rtn As Integer
rtn = SysCmd(acSysCmdSetStatus, "Reconnecting database objects...")
Set db = CurrentDb
For X = 0 To db.TableDefs.Count - 1
Set tdf = db.TableDefs(X)
cnt = tdf.Connect
' Already connected to the requested database.
strCurrent = Mid(cnt, 10, 6)
If strCurrent = strDSN Or strCurrent = (strDSN & ";") Then GoTo NextX
' Refresh all connections.
If tdf.NAME Like "dbo_*" Then
cnt = "ODBC;DSN=" & UCase(strDSN) & ";SRVR=FRED;DB=" &
LCase(strDSN) & ";"
tdf.Connect = cnt
tdf.RefreshLink
End If
Set tdf = Nothing
NextX:
Next X
Set db = Nothing
End Sub

Signature
Carol
> There is a module in solutions.mdb (sample database) that checks if the data
> is available on startup. If not, it pops up the File Open dialog to let you
[quoted text clipped - 21 lines]
> >
> > Anybody got any clues?
nafr - 17 Sep 2005 17:51 GMT
Carol
Thanks for the code. Not sure how it works but will investigate further. I
dont know if the following will clarify things further or not.
I am hoping to be able to link a numbe rof taboles to differnet backend
MDBs. The location of the seperate MDBs will also change depending on whether
I am on the network at work, a satelite office with its own server or at home
on the laptop.
The front end is the same mdb in all three situations.
I had hoped to be able to offer the user (myself anfd others) the option at
start up to indicate their current location and then use code to refresh the
links as appropriate.
If your code is the right answer then thanks, but if not any other clues?
Thanks
Nick
> Sub AutoReconnect()
>
[quoted text clipped - 59 lines]
> > >
> > > Anybody got any clues?