If you continue to use the original code you posted, I am not sure I can
help. In addition to any tables that are in your database that are not linked
there are system tables that Access creates. Therfore you cannot set the
connection string for those tables to the strConnect variable. The code you
posted below loops through ALL of the tables in the database and assumes they
are linked tables and tries to link them to controller.mdb. If you add the
following line to your code and test it, it may shed some light on what is
going wrong. The msgbox line below will give you a message box with the name
of the table it is trying to re-link to.
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim strConnect As String
strConnect = CurrentProject.Path
strConnect = ";DATABASE=" & strConnect & "\controllers.mdb"
Set db = CurrentDb
For Each tdf In db.TableDefs
msgbox tdf.name
tdf.Connect = strConnect
tdf.RefreshLink
Next tdf
Set tdf = Nothing
Set db = Nothing
> Ralph,
> At present I am not on the network. The primary usage of this db is in the
[quoted text clipped - 36 lines]
>
> Polly
polparrot - 13 Mar 2007 02:00 GMT
Thank you Ralph,
I'll give that a try.
Polly
polparrot - 14 Mar 2007 14:30 GMT
Ralph,
I put the msgbox in and it definitly helped me find my problem. Thank you so
much for you patience in helping me. I did not realize that the
currentProject.Path command value was case sensitive. I feel like a fool.
All of you guys are great and help tremendously!
Polly