hi,
I am at my wits end on this one.
Problem is, this was working a few weeks ago but when I tried it again, it is giving me a type mismatch error.
Here is my code:
On Error GoTo PictureNotAvailable
Me!ImageFrame.Picture = Me!ImagePath
PictureNotAvailable:
strNoImage = "Z:\Photos\NoImage.gif"
Me.ImageFrame.Picture = strNoImage
Basically, I have a form where a user can select an image to attach to an item and it stores the image path on to a master table.
My problem is the code ALWAYS seems to go straight to the GoTo statement. So it keeps displaying "No Image"
I tried commenting out the Error trap and it works but when I have no path/image assigned to an item, it's giving me a "Type Mismatch" message.
Any ideas? It's driving me crazy!
Help please!
I am at my wits end on this one.
Problem is, this was working a few weeks ago but when I tried it again, it is giving me a type mismatch error.
Here is my code:
On Error GoTo PictureNotAvailable
Me!ImageFrame.Picture = Me!ImagePath
PictureNotAvailable:
strNoImage = "Z:\Photos\NoImage.gif"
Me.ImageFrame.Picture = strNoImage
Basically, I have a form where a user can select an image to attach to an item and it stores the image path on to a master table.
My problem is the code ALWAYS seems to go straight to the GoTo statement. So it keeps displaying "No Image"
I tried commenting out the Error trap and it works but when I have no path/image assigned to an item, it's giving me a "Type Mismatch" message.
Any ideas? It's driving me crazy!
Help please!