Hi,
I've looked at various threads on here about how to show images, and I've not been able to get any of them working for me, so I'm hoping someone on here will be able to help me.
I've got a continuous form which I choose a record from and open in a seperate form, (frmPicture).
On frmPicture is have the ID, Name and Path of the image in text boxes and an image frame.
What I'm trying to do is upon loading the form, show the image in the image box.
I am opening the individual record okay, but the image doesn't show. I've got it set to a default 'No Image To Show' picture, but this doesn't change.
This is the code I've currently got...
Private Sub Form_Load()
On Error GoTo ErrorHandler
Dim imgPath As String
imgPath = Me!crdPath.Text
imgPhoto.Picture = imgPath
ErrorHandler:
Select Case Err.Number
Case 2220
imgPath = "C:\Documents and Settings\Katy\My Documents\My Pictures\Card Photos\no image.jpg"
imgPhoto.Picture = imgPath
Resume
End Select
End Sub
I'm not sure how/what needs changing so some help would be really appreciated.
Thanks
Steve
I've looked at various threads on here about how to show images, and I've not been able to get any of them working for me, so I'm hoping someone on here will be able to help me.
I've got a continuous form which I choose a record from and open in a seperate form, (frmPicture).
On frmPicture is have the ID, Name and Path of the image in text boxes and an image frame.
What I'm trying to do is upon loading the form, show the image in the image box.
I am opening the individual record okay, but the image doesn't show. I've got it set to a default 'No Image To Show' picture, but this doesn't change.
This is the code I've currently got...
Private Sub Form_Load()
On Error GoTo ErrorHandler
Dim imgPath As String
imgPath = Me!crdPath.Text
imgPhoto.Picture = imgPath
ErrorHandler:
Select Case Err.Number
Case 2220
imgPath = "C:\Documents and Settings\Katy\My Documents\My Pictures\Card Photos\no image.jpg"
imgPhoto.Picture = imgPath
Resume
End Select
End Sub
I'm not sure how/what needs changing so some help would be really appreciated.
Thanks
Steve