dynamically linking to images

shepHeard

Registered User.
Local time
Today, 12:25
Joined
Apr 14, 2006
Messages
27
Hello Access heroes..

I'm using the following code to dynamically link to images in a popup form:

Code:
thisPicString = GetPath(CurrentDb.Name) & DLookup("details", "infoTbl", "Item = " & Chr(34) & "Image Folder" & Chr(34)) & "\"
MsgBox thisPicString

Me.Image1.Picture = thisPicString & "DNA.gif"
Me.Image17.Picture = thisPicString & "wDNAslogo1.gif"
Me.Image18.Picture = thisPicString & "defralogo1.gif"

The thing is, it finds the images fine, but before it does this I get an error saying Access cannot open the file name xyz.

xyz is the path the picture has originally, but doesn't exist anymore.

Any ideas? I've tried this code at _Open, _Load and _Current, but all to no avail. At what point is access trying to link to these images? Can I get the code in there first?

Cheers,
 
Why do you need an image path loaded in the image control? For dynamic images, I add an image control, select a picture, and then remove the picture...leaving an empty image control.
 
It doesn't seem to like me deleting the path in the image control - it just puts the original path back in if I delete it in the properties box...
 
Gah. My mistake. Sorry about that - I'm just being a muppett. If I delete the path and then close the properties box it's all OK.

I guess my only saving grace is it's 2.30am here.

Cheers ;o)
 
Last edited:

Users who are viewing this thread

Back
Top Bottom