Error not being trapped

Posted on 2012-08-22
Last Modified: 2012-08-22
*** 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
Question by:Ei0914
    LVL 75

    Accepted Solution

    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    VBA editor>>Tools>>Options ... General

    Author Closing Comment

    Oh for heaven's sake.... I'm a dork. Should have checked that. That was the problem. Thanks a lot!!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
    Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
    Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
    What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now