Link to home
Start Free TrialLog in
Avatar of john_price
john_price

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of paasky
paasky
Flag of Finland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Here's an example:

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

Paasky
Avatar of jschrisman
jschrisman

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"
Avatar of john_price

ASKER

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.