M
mattc66 via AccessMonster.com
I have the below code and I want to respond to the user with a message if the
ImagePath is not found. I want to be clear - so if the user clicks on the
ItemComponent and the path is not found it pops up and asks the user to debug
or end. What I'd like it to do is pop up and say path or image not found. Not
sure what the code would be to do this.. Can anyone help. Thanks
Private Sub ItemComponent_Click()
If Me.FileType = "jpg" Then
If IsNull(Me.[ImagePath]) Then
Forms!frmItemCompEntry!ImageData.Visible = False
Forms!frmItemCompEntry!lblNoImage2.Visible = True
Forms!frmItemCompEntry!lblNotJpg.Visible = False
Else
Forms!frmItemCompEntry!ImageData.Picture = [ImagePath]
Forms!frmItemCompEntry!ImageData.Visible = True
Forms!frmItemCompEntry!lblNoImage2.Visible = False
Forms!frmItemCompEntry!lblNotJpg.Visible = False
End If
Else
Forms!frmItemCompEntry!lblNotJpg.Visible = True
Forms!frmItemCompEntry!lblNoImage2.Visible = False
Forms!frmItemCompEntry!ImageData.Visible = False
End If
End Sub
ImagePath is not found. I want to be clear - so if the user clicks on the
ItemComponent and the path is not found it pops up and asks the user to debug
or end. What I'd like it to do is pop up and say path or image not found. Not
sure what the code would be to do this.. Can anyone help. Thanks
Private Sub ItemComponent_Click()
If Me.FileType = "jpg" Then
If IsNull(Me.[ImagePath]) Then
Forms!frmItemCompEntry!ImageData.Visible = False
Forms!frmItemCompEntry!lblNoImage2.Visible = True
Forms!frmItemCompEntry!lblNotJpg.Visible = False
Else
Forms!frmItemCompEntry!ImageData.Picture = [ImagePath]
Forms!frmItemCompEntry!ImageData.Visible = True
Forms!frmItemCompEntry!lblNoImage2.Visible = False
Forms!frmItemCompEntry!lblNotJpg.Visible = False
End If
Else
Forms!frmItemCompEntry!lblNotJpg.Visible = True
Forms!frmItemCompEntry!lblNoImage2.Visible = False
Forms!frmItemCompEntry!ImageData.Visible = False
End If
End Sub