A
Afrosheen
I have in my table a field for my image file name called IdPict. I also have
a form with a picture box called imgEmpty. When try to access the picture it
always says that the picture is not found when the picture is there. The
drive and locations are valid. It will display the picture, but it comes up
with the error MsgBox. Could you please go over the code? Any suggestions
would be appreciated. I do want the error code in it if possible because when
enter a new record and the picture is not there then it will add a default
"No Picture"
Thanks
Private Sub Form_Current()
On Error GoTo Err_Form_Current
Me.imgEmpty.Picture = "g:\NCI Database\NCI Pictures\" & Me!IdPict.Value
Err_Form_Current:
Call LogError(Err.Number, Err.Description, "Form_Current()")
Call MsgBox("Picture was not found on this drive. A generic picture has
been added", vbExclamation, Application.Name)
'IdPict = "na.bmp"
End Sub
a form with a picture box called imgEmpty. When try to access the picture it
always says that the picture is not found when the picture is there. The
drive and locations are valid. It will display the picture, but it comes up
with the error MsgBox. Could you please go over the code? Any suggestions
would be appreciated. I do want the error code in it if possible because when
enter a new record and the picture is not there then it will add a default
"No Picture"
Thanks
Private Sub Form_Current()
On Error GoTo Err_Form_Current
Me.imgEmpty.Picture = "g:\NCI Database\NCI Pictures\" & Me!IdPict.Value
Err_Form_Current:
Call LogError(Err.Number, Err.Description, "Form_Current()")
Call MsgBox("Picture was not found on this drive. A generic picture has
been added", vbExclamation, Application.Name)
'IdPict = "na.bmp"
End Sub