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?

[Webinar] Streamline your web hosting managementRegister Today

x
 
paaskyConnect With a Mentor Commented:
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
 
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
All Courses

From novice to tech pro — start learning today.