Error not being trapped

*** The below error 3265 doesn't result in the code hitting the Err_Proc -- it breaks on the line with the error...

Private Sub DeleteLinks()
On Error GoTo Err_Proc

    Dim db As DAO.Database
    Dim td As DAO.TableDef
    Dim rs As DAO.Recordset

    Set db = CurrentDb()
    Set td = db.TableDefs("tblODBCDataSources")
    Set rs = td.OpenRecordset
    Do Until rs.EOF = True
        db.TableDefs.Delete rs!LocalTableName <---------

    Exit Sub
    Select Case Err.Number
        Case 3265   'item not found in this collection *** Should be getting trapped here
            Resume Next
        Case Else
            MsgBox Err.Number & "--" & Err.Description, vbCritical
            Resume Exit_Proc
    End Select
End Sub
Eileen MurphyIndependent Application DeveloperAsked:
Who is Participating?
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
VBA editor>>Tools>>Options ... General
Eileen MurphyIndependent Application DeveloperAuthor Commented:
Oh for heaven's sake.... I'm a dork. Should have checked that. That was the problem. Thanks a lot!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.