Linked images and Path

  • Thread starter Thread starter Wanadoo
  • Start date Start date
W

Wanadoo

Hi,

based on the NorthWind example, I've created a simple catalog application
(Access XP) with linked images stroed in a directory tree

C:\myappli\images\product1,
C:\myappli\images\product2,
...

In order to be bale to move my application to another disk or to distribute
it on CDs, I'd like to make my path independant from the drive letter.
How can I achieve that?

Thanks for help

Louis
 
Store only that part that is lower in the directory structure as your
application. I am assuming they will be stored in a subfolder beneath your
application. The following code:

Function ThePath() As String
Dim FileName As String
FileName = CurrentDb.Name
Thepath = (Mid(Filename, 1, Len(Filename) - Len(Dir(Filename))))
End Function

will return the path where your application resides to the variable
"ThePath". Then simply concatenate your stored portion to ThePath:

ThePath()&"\images\product1"
 
Back
Top