Make Linked Tables Local

Newbie2001

New member
Local time
Yesterday, 20:46
Joined
Dec 6, 2011
Messages
6
Can table linking be simplified ??

I have a DB with a front end (ATAfront.mdb) and a back end (ATAback.mdb) (or, eventually, mde's) sitting on my C: drive. I want to take it elsewhere .. maybe to a flashdrive .. to see how it works when moved. The front end ALWAYS wants to refer to the tables in the back end at their ORIGINAL C: drive location. Now I get around this by unlinking the tables ... then relinking to the local tables ...

(NewPathname determined on load)

Set Dbs = CurrentDb
Set Tdfs = Dbs.TableDefs

'Loop through the tables collection
For Each Tdf In Tdfs
If Tdf.SourceTableName <> "" Then 'If the table source is other than a base table
Tdf.Connect = ";DATABASE=" & NewPathname 'Set the new source

Tdf.RefreshLink 'Refresh the link
End If
Next 'Goto next table

My question ... bet you thought I'd never get to it:

Can front ends be set to ALWAYS link to local back ends ?? Would seem to be a lot simpler, if possible.

Thank you, in advance, for the brilliance I KNOW will be evident .. momentarily :)
 
Thanks RuralGuy ...

... but that is almost EXACTLY what I'm going now ... RE-LINKING. I want my front end to just AUTOMATICALLY assume the tables are local ... never anything BUT local. Just thought there might be a flag I could set on the table defs to accomplish that.
 
I don't think there is any other way to do it.
 

Users who are viewing this thread

Back
Top Bottom