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.
john_priceAsked:
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.

paaskyCommented:
Hello john_price,

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

Regards,
Paasky
0

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
paaskyCommented:
Here's an example:

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

Paasky
0
jschrismanCommented:
You can retrieve the current path with the CurDir function.

Example:
AppPath = CurDir

You can change the current path with ChDir.

Example:
ChDir "C:\MyPictures"
0
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.
0
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.