By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,014 Members | 1,196 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,014 IT Pros & Developers. It's quick & easy.

Access XP - Getting the current directory

P: n/a
I created a db that houses info about pictures that were scanned into
the PC. The pictures are stored on the file system. I have a form
coded so that it shows thumbnails of the images, which are stored in a
directory under where the Access .mdb file is. For instance, in c:
\MontvillePics, there exists MontvillePics.mdb. Then under c:
\MontvillePics\pics are the actual .jpg files.

Right now, I have the paths hard coded with those directories and it
works fine. But, I want to put the db and pics onto a DVD so I can
give it to someone and have them run it on any PC with Access.

The problem is, once I put it on a DVD, I can not use the hard coded
location for the pictures. I would like to be able to determine the
path of the MontvillePics.mdb that I am running, so that I can access
the pictures using a relative path from there (or a constructed
absolute path). However, everything I try seems to just get me the
MyDocuments folder rather than the current folder. I am using Office

Do you know of any way of getting the directory the currently running
database exists in?

Thank you,

Mike Bianco

Mar 21 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a

The CurDir() function should do it. To try it, put the following in
the Immediate Window and see what line is printed below it.


Mar 21 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.