Detecting current path

  • Thread starter Thread starter Magius96
  • Start date Start date
M

Magius96

In many of the database applications that I've built, I have to import files
into tables. I've got everything working, but there is one minor snag. I've
had to hard code the full path to where the files would be found, but I don't
want to do that.

The files will always be in either the same directory as the MDB file, or in
the 'Attachments' directory of the same directory.

So what I need, is a way to automatically detect what directory the current
running MDB file is located in, so that if i give the DB to someone else, the
import scripts will still work properly.

Oh yeah, and if you could help me to determine the exact name of an outlook
inbox from access, that would be great too!
 
The current path and the location of the database are usually not the same
(it depends on how the application was opened).

To know where the application is located, use

Application.CurrentProject.Path
 
Back
Top