How to know the access database file directory/path name?

message from Michael on 30 May 2004
Hi,
I am working with Access 2000, to write a application.
I need a function to know where is my current access database file located.
Could you please tell me how to read it out.

For example,
I have a file saved on hard disc as "D:\MyApplication\AccessDB.mdb", or on
a server side sharing folder
\\MyServer01\ApplicationFolder\Access\AccessDB.mdb",

how can I get the full path name and file name?

eg. strAppPath="D:\MyApplication\" (or
"\MyServer01\ApplicationFolder\Access\")
and strAppFilename="AccessDB.mdb"

Thanks a lot

Michael
 
Douglas J. Steele replied to Michael on 29 May 2004
CurrentProject.FullName will give you the complete path
(D:\MyApplication\AccessDB.mdb), while
CurrentProject.Name will give you AccessDB.mdb and CurrentProject.Path will
give you D:\MyApplication\

You can also use CurrentDb().Name to give you D:\MyApplication\AccessDB.mdb
 

Archived message: How to know the access database file directory/path name? (Microsoft Access)