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
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
