Question On Error Command Help

Kapellu2

Registered User.
Local time
Today, 15:41
Joined
Sep 9, 2010
Messages
50
Hey guys,

Right now I have a command button on my main form that opens a browse box and lets the user browse for a document. Everything works fine, except if the user opens the browse box and hits cancel an error will pop up telling them that the path/file is invalid. As soon as they hit end on the error box everything is fine.

My question is, is there a way to make access skip that error message? I tried to research "On Error" commands but didn't come up with much.
 
You don't need to put in error handling for this - you need to handle what you are trying to assign the path to. What code are you using for browsing?
 
Sounds like the OP is using the FileDialog.
 
Sounds like the OP is using the FileDialog.

And that's okay, but I need to see the code which takes and assigns the value from the dialog. It is simple enough to put in a

strDialogResult = FileDialog ....etc.

If strDialog <> "" Then
...etc.
End If

Which can solve things with no error.
 

Users who are viewing this thread

Back
Top Bottom