problem displaying image in portable form

lucyLocket

Registered User.
Local time
Today, 00:07
Joined
Dec 24, 2007
Messages
15
Hello

I have one default image in a folder called "images" in the same folder as my database. The image is called default.jpg.

I have a form with Picture Control in which I want this image to display when the form loads.

This code, placed in the VBA environment in Sub form_onload isn't working at the moment,

Dim strFile="default.jpg"

Me![Image93].Picture = CurrentProject.Path & "\images\" & strFile

Any ideas how I can get it to work. I want to make this application portable without having to alter paths to the image on other people's machines.

Is there another way, eg by putting just the file name somehow in the database.

Thanks
 
Try:
Code:
Dim strFile As String
strFile = "default.jpg"
Me![Image93].Picture = CurrentProject.Path & "\images\" & strFile

Chris
 
Last edited:
Thank You, Thank You, Thank You....

I was so near and yet so far,

Great
 

Users who are viewing this thread

Back
Top Bottom