Relative path for linked tables

G

Guest

I have two databases (one with the GUI and one with the actual data) which
I've linked together. I was wondering: is it possible to have all the linked
tables refer to a relative path (ie. ../db) instead of an absolute path like
'C:\project\db\'?
 
D

Douglas J. Steele

It's not possible.

The closest you can come is to add code that runs at startup to determine
where the linked tables should exist (and that the files actually exist
there) and relink the tables if they're not already linked to that location.
 
G

Guest

Don't think so Douglas. Using the linked table manager, in the dialog box,
point to the back end database, then change the first part of the path (Ie
g:\AccessData\xyz_be.mdb to \\myserver\user stuff\accessdata\xyz_be.mdb)

If you loose connection you will have a problem, but you idea of code is
good. What I do in all apps is in the start up code (whether it be a form or
a module) check to see if all links are good. If a link is missing, it
presents a common dialog box for the user to point the the back end mdb, then
uses the selected path to reestablish the links.
 
G

Guest

Is that trick also possible with Access 2002, because I can't seem to find
that particular option...
 
D

Douglas J. Steele

How is a UNC a relative path? I don't see your suggestion being relevant to
the question at hand.
 
D

Douglas J. Steele

I believe what Klatuu is saying is that he has code that pops up the Windows
File Open dialog if the connections are incorrect, not that Access does it
automatically. There's code that will do something similar to this at
http://www.mvps.org/access/tables/tbl0009.htm at "The Access Web".

To use a UNC as opposed to a mapped drive in the Linked Table Manager, go
through Network Neighborhood or My Network Places or whatever it's called in
your version of Windows rather than selecting the mapped drive letter.
 
G

Guest

Can you post that code? I need to do exactly what you are asking and it
seems most of the examples on the web are far to extensive. If not, no big
deal. I was just hoping.

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top