vipersmind
it can't be!
- Local time
- Tomorrow, 07:40
- Joined
- Dec 26, 2002
- Messages
- 82
I am using code from the microsoft site below to check linked tables in my database when to database opens and then prompt the user to locate the data source if it's no longer found.
(not using the common dialog control though)
http://support.microsoft.com/kb/181076/en-us
This works great where the tables are named the same thing in both databases.
But as you are aware you can link a table into the front end and then rename it without damaging the integrity of the link.
This code requires that the tables be named exactly the same in the front end as the back (source of the link) even down to being case sensitive.
In the front end I have a table called collar from database A and collar1 from database B (dont ask).
Both database A & B contain the table collar but you can't have 2 named the same hence collar and collar1.
Now when using the code to check the links it's fine if the links dont fail (dosen't skip a beat) but if I am promted to re-establish the link then it looks for collar from database B not collar1 as it's called in the front end.
I can use the Tranferdatadase dodad to link these ones but would rather try and be a bit smarter.
any ideas or am I just talking crazy??
Cheers
Cress
(not using the common dialog control though)
http://support.microsoft.com/kb/181076/en-us
This works great where the tables are named the same thing in both databases.
But as you are aware you can link a table into the front end and then rename it without damaging the integrity of the link.
This code requires that the tables be named exactly the same in the front end as the back (source of the link) even down to being case sensitive.
In the front end I have a table called collar from database A and collar1 from database B (dont ask).
Both database A & B contain the table collar but you can't have 2 named the same hence collar and collar1.
Now when using the code to check the links it's fine if the links dont fail (dosen't skip a beat) but if I am promted to re-establish the link then it looks for collar from database B not collar1 as it's called in the front end.
I can use the Tranferdatadase dodad to link these ones but would rather try and be a bit smarter.
Code:
DoCmd.TransferDatabase acLink, "Microsoft Access", "\\ABC7\Database\data\CCdata.mdb", acTable, "collar", "collar1", False
Cheers
Cress