i have entered the following codes
i should display the image if the file is valid and if the is an error, the image shall be set to "K:\Staff Folders\JinLong\New Folder\nochart.jpg".
by using the above code, when the image is invalid, it is set to "K:\Staff Folders\JinLong\New Folder\nochart.jpg"
but when the image is valid, it also set the image as "K:\Staff Folders\JinLong\New Folder\nochart.jpg"
how to solve this problem?
Code:
Private Sub Image47_Click()
Dim DBpath As String
On Error GoTo Err_Image47_Click
If IsNull([Yield Trend Chart]) Then
Me.Image47.Picture = "K:\Staff Folders\JinLong\New Folder\nochart.jpg"
Else
DBpath = [Yield Trend Chart]
Me.Image47.Picture = DBpath
End If
Err_Image47_Click:
Me.Image47.Picture = "K:\Staff Folders\JinLong\New Folder\nochart.jpg"
End Sub
i should display the image if the file is valid and if the is an error, the image shall be set to "K:\Staff Folders\JinLong\New Folder\nochart.jpg".
by using the above code, when the image is invalid, it is set to "K:\Staff Folders\JinLong\New Folder\nochart.jpg"
but when the image is valid, it also set the image as "K:\Staff Folders\JinLong\New Folder\nochart.jpg"
how to solve this problem?