Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Relative path/embedded pics trouble

Status
Not open for further replies.

Newbie456

Technical User
Nov 21, 2005
37
US
I have a database with the picture files referenced by relative path, for example,

JPG/imagename.jpg

It works fine, as long as I open the file from access. If I try and open the file by going to My Computer, then opening the database file from the drive, my pictures won't show (can't follow the relative path?). If I open access and open the file from there, it works fine. Any insight as to what is causing this problem? Thanks!
 
What about something like this ?
Left(CurrentDB.Name, InstrRev(CurrentDB.Name, "\")) & "JPG/imagename.jpg"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
What about something like this ?
Left(CurrentDB.Name, InstrRev(CurrentDB.Name, "\")) & "JPG/imagename.jpg"

Or this (VBA code):
ChDir Left(CurrentDB.Name, InstrRev(CurrentDB.Name, "\") - 1)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I'm not sure I understand. Are you suggesting I add that to my code?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top