A
Alan
I am trying to test for the presence of a Network drive by
locating a file on it. I would like different forms opened
depending on the presence of the Network.
However the problem is that I cannot get the error handler
to deal with the error message when I deliberately set the
code to find a non-existant file. The runtime 53 error
message comes up and the code stops.
I have listed the sample code here, and obviously I have
made a simple error, but as yet I am not able to find it,
despite looking through the helpfiles and Tech knowledge
base- please make me feel foolish!! ;-)
Sub helper()
On Err GoTo helper_err
Dim result As Integer
FileLen "T:/Fantasy.xls"
If result <> -1 Then
MsgBox "File found"
DoCmd.OpenForm "Network Tasks"
End If
Exit Sub
helper_err:
MsgBox "You are not attached to the Network"
DoCmd.OpenForm "Local Updates Only"
End Sub
locating a file on it. I would like different forms opened
depending on the presence of the Network.
However the problem is that I cannot get the error handler
to deal with the error message when I deliberately set the
code to find a non-existant file. The runtime 53 error
message comes up and the code stops.
I have listed the sample code here, and obviously I have
made a simple error, but as yet I am not able to find it,
despite looking through the helpfiles and Tech knowledge
base- please make me feel foolish!! ;-)
Sub helper()
On Err GoTo helper_err
Dim result As Integer
FileLen "T:/Fantasy.xls"
If result <> -1 Then
MsgBox "File found"
DoCmd.OpenForm "Network Tasks"
End If
Exit Sub
helper_err:
MsgBox "You are not attached to the Network"
DoCmd.OpenForm "Local Updates Only"
End Sub