What's the VBA equivalent to App.Path?

The title pretty much says it.  I want to load pictures to image boxes at the form_current event, but not store the pictures in the database itself.  Would like to use the equivalent of app.path to set the directory location.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hello john_price,

You can use Currentdb.Name for getting the current DB path. (just remove xxxx.mdb) from the property value.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Here's an example:

AppPath = Left(Currentdb.Name,Instr(1,CurrentDB.Name,"<my database name>")-1)

You can retrieve the current path with the CurDir function.

AppPath = CurDir

You can change the current path with ChDir.

ChDir "C:\MyPictures"
john_priceAuthor Commented:
Thought I had already accepted this as the answer.  I must have pushed the wrong button.  My comment was basically that "Of course!!" ... and a lament that there was no such direct and intuitive way as "app.path"  I went then and applied the concept in a manner similar to your second comment.  Thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.