I'd like to get the path of the current database from inside VBA.
Is this possible?
E.g. If my database is \\server1\Access\MyApp.mdb
I'd like to get "\\server\Access\" somehow
I'd like to get the path of the current database from inside VBA.
Is this possible?
E.g. If my database is \\server1\Access\MyApp.mdb
I'd like to get "\\server\Access\" somehow
Application.CurrentDb.Name
Will return the path + name
Here are two ways ...
CurrentProject.Path
Left$(CurrentDb.Name, Len(CurrentDb.Name) - Len(Dir(CurrentDb.Name)) -
1)
The first method requires Access 2000 or later, the second will also work
with earlier versions.
--
Brendan Reynolds
try compact/repairing
sometimes i run into this locking issue, and that seems to clear it up.
mike