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
 
Back
Top