Refresh link tables automatically

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi.

There are 3 databases (we'll call it A, B, C) in shared folder that someone
on my team created and uses every monday for her reporting. I uses her
databases to do my part of the reporting. Instead of using the original, I
copy the databases and paste them in my folder so that I can work them at
home if needed( I have a laptop). Database B and C have few tables that are
linked from database A. When I copy to my folder the links still stays the
same. Is there anyway to automatically ( in code or however) to have the
links updated to the database in my folder ?

Thank you!
 
http://www.mvps.org/access/tables/tbl0009.htm
Relink Access tables from code

http://www.mvps.org/access/api/api0001.htm
Call the standard Windows File Open/Save dialog box

The 1st link above provides some sample code to do what you want. (If I
remember correctly, at startup it will try to relink tables to the
last-known file location. If the file is not found (or the relink otherwise
fails), it will prompt the user for the location of backend file.
(Prompting the user requires code similar to that in the 2nd link).

The relink concept could be modified to try additional locations (say, the
same directory as the app?, a registry setting saved on the local machine?)
before resorting to a user prompt. So you end up with something that is as
automated as you wish, but asks for help when it runs out of places to look.

HTH,
 
Back
Top