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

M

Michael

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
 
D

Douglas J. Steele

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
 

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