Current directory

stepone

Registered User.
Local time
Today, 18:46
Joined
Mar 2, 2004
Messages
97
Hi folks,

How can I programmatically determine the current directory of my MDB file when my main switchboard form is opened ? I can use the .name property to get the location with the DB name on the end, but is there any way to get just the directory ?

I need to dynamically relink my linked tables, and I need to get the current directory to do that (assuming the main MDB file and the MDB file containing the linked tables are in the same folder).

Thanks all,
Peter.
 
I am working with linked tables as well, and am having trouble finding a way to change the Directory for the linked tables through VBA. What methods or properties are you using to change the links?
 
Currentdb.tabledefs("TableName").connect is the propertie you are looking for Yeatmanj...

Try:
left(Currentdb.name, len(currentdb.name) - len(dir(currentdb.name)))

Regards
 

Users who are viewing this thread

Back
Top Bottom