A family of Microsoft relational database management systems designed for ease of use.
I am trying to include an error trap with my "Open Image Button" so that when searched and no digital image file is found a message box will come up with "File does not exist".
The following is the code I have entered:
Private Sub OpenImageBtn_Click()
Application.FollowHyperlink Me.DigitalFileName
If Dir(Me.DigitalFileName) = "" Then
MsgBox "File doesn't exist"
Else
Application.FollowHyperlink Me.DigitalFileName
End If
End Sub
When I click the "Open Image Button" the message box don't appear and the image is opened twice. Can anyone tell me what's wrong with this code.
Thanks, Walt