Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2002
    Posts
    108

    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.

    Any ideas?

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    mystery!
    i do something similar and 52 works fine for me
    (...after a pause whilst it tries to find the server)
    Code:
    
        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
    izy
    Last edited by izyrider; 12-17-06 at 06:16.
    currently using SS 2008R2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •