Get path/directory of current mdb

  • Thread starter Thread starter John
  • Start date Start date
J

John

How do I get the current path or directory of the
database I am working in using VBA
The help file is "slightly" confusing!
And once I have it can I create directories under it?

Thanks in advance!
 
Are you using Access 2000/XP???


If so, then CurrentProject.Path will return the path of
the database.

Then you can MkDir to create directories.


Chris
 
Using Access2000
Thanks for the help!

Chris said:
Are you using Access 2000/XP???


If so, then CurrentProject.Path will return the path of
the database.

Then you can MkDir to create directories.


Chris
 
dim db as database
dim name as string

set db=currentdb.name 'path of the database
name=dir(db) 'database's name


Stelios T.
Greece
 

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

Back
Top