Thread: Error 52 wont go to error trap
12-16-06, 13:40 #1Registered User
- Join Date
- Feb 2002
Unanswered: Error 52 wont go to error trap
I have code that is relinking the backend tables and it checks several paths with no problem if they are not there, but when checking '\\server\c\' and not actually connected to the network, it gives error 52 and will not go through the error handling routine.
If checking a folder on the c drive, it will go through the error handler.
I have searched the forum and microsoft, but no answer yet.
12-17-06, 05:13 #2Cavalier King Charles
- Join Date
- Dec 2002
- Préverenges, Switzerland
i do something similar and 52 works fine for me
(...after a pause whilst it tries to find the server)
If Dir(gloServerUNC & recs!nomServer) = "" Then recs.Close shoProgress "Connection FAILED" strErr = "Unable to access the server file" GoTo bad_Xxxxx End If exit_Xxxxx: Set recs = Nothing Exit Function err_Xxxxx: Xxxxx = False Select Case Err.Number Case 52 'following msg shows if no network MsgBox "Could not talk to the server!", vbExclamation, "Xxxxx FAILED" Case Else 'etc 'etc End Select Resume exit_Xxxxx bad_Xxxxx: 'code does not get here if no network Xxxxx = False MsgBox "Fatal ERROR" & vbCrLf & strErr, vbExclamation, "Xxxxx FAILED GoTo exit_Xxxxx
Last edited by izyrider; 12-17-06 at 05:16.currently using SS 2008R2