Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 301459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:00:27+00:00 2026-05-12T07:00:27+00:00

—AFTER FURTHER INVESTIGATION— tblABC in the below example must be a linked table (to

  • 0

—AFTER FURTHER INVESTIGATION—
“tblABC” in the below example must be a linked table (to another Access database).

If “tblABC” is in the same database as the code then the problem does not occur.

Hi,

We have recently upgraded to Office 2007.

We have a method in which we have an open recordset (DAO). We then call another sub (UpdatingSub below) that executes SQL. This method has its own error handler. If error 3381 is encountered then the recordset in the calling method becomes “unset” and we get error 3420 ‘Object invalid or no longer set’. Other errors in UpdatingSub do not cause the same problem.

This code works fine in Access 2003.

Private Sub Whatonearth()

    Dim rs As dao.Recordset

    set rs = CurrentDb.OpenRecordset("tblLinkedABC")

    Debug.Print rs.RecordCount

    UpdatingSub "ALTER TABLE tblTest DROP Column ColumnNotThere"

    'Error 3240 occurs on the below line even though err 3381 is trapped in the calling procedure
    'This appears to be because error 3381 is encountered when calling UpdatingSub     above  
    Debug.Print rs.RecordCount

End Sub


Private Sub WhatonearthThatWorks()

    Dim rs As dao.Recordset

    set rs = CurrentDb.OpenRecordset("tblLinkedABC")

    Debug.Print rs.RecordCount

    'Change the update to generate a different error
    UpdatingSub "NONSENSE SQL STATEMENT"
    'Error is trapped in UpdatingSub. Next line works fine.
    Debug.Print rs.RecordCount

End Sub


Private Sub UpdatingSub(strSQL As String)
    On Error GoTo ErrHandler:
    CurrentDb.Execute strSQL

ErrHandler:
    'LogError'

End Sub

Any thoughts? We are running Office Access 2007 (12.0.6211.1000) SP1 MSO (12.0.6425.1000). Perhaps see if SP2 can be distributed?

Sorry about formatting – not sure how to fix that.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:00:28+00:00Added an answer on May 12, 2026 at 7:00 am

    Thanks for all your input – and sorry for any confusion re my problem – it was a weird one. I tried it on a PC running

    Office Access 2007 (12.0.6423.1000) SP2 MSO (12.0.6425.1000)

    rather than

    Office Access 2007 (12.0.6211.1000) SP1 MSO (12.0.6425.1000)

    and I do not get the same problem. Time to see if we can get the powers to be to install the newer version.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have set of xml elements like this: <item code=<HTML_CODE> /> For example: <items>
I'm creating a FORM with PHP for an intranet webpage. Another PHP script is
All of my code is on my SVN, but I want some of it
&mdash; or &#8212; Is there a difference between these? Is one better-supported than the
Any idea whats the difference between the two commands below? Command: manage.py runfcgi method=threaded
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I'm using a DatePicker ( org.apache.wicket.extensions.yui.calendar.DatePicker — Javadoc ) in a form. The form
string formIdList = 8256, 8258, 8362, 8120, 8270, 8271, 8272, 8273, 8257, 8279, 8212,
I am using JSoup to parse a gb2312 charset page: http://vars.sinaapp.com/u/t/jsoup_output_encoding_issue.html source code: String
I'm using some of Firefox's specially-defined values for cursor, in particular -moz-zoom-in -moz-zoom-out -moz-grab

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.