Referenced Image Issues

Abbos

Registered User.
Local time
Today, 15:02
Joined
May 11, 2005
Messages
64
Hi,

I have a database where by users can input images. The database then copies the selected image into the current working directory\images (c:\db\images as an exmaple) the it keeps a reference to the path in a table. When users then browse the records on the form I have an ImageFrame which looks up that path and displays the picture. This all works fine.

The problem I have is that sometimes the working directory changes. I then have problems with the previous images inputted as the tbale where the reference is stored is still pointing to c:\db\images. How can I can it so that rather than have a fixed path to c:\db\images the database will just looking in the current application directory\images for the pictures?

Many Thanks,
 
Dim strPath As String

Code:
strPath = CurrentProject.Path & "\Images\"

Images is the name of the folder holding the jpg's and it must be located in the same directory as the database.
 
Last edited:
Use

CurDir & "\myphoto.jpg"

CurDir is the builtin Function which will fetch the Current Directorty path.

visit my site http://msaccessblog.blogspot.com/ for tips and tricks in Form Design.
 

Users who are viewing this thread

Back
Top Bottom