Run-time error 3167: Record is deleted

Posted on 2011-10-14
Last Modified: 2012-05-12
I have a user receiving a message that I don't get. They get run-time error 3167: Record is deleted. It happens when clicking on a button that is to delete a record from a table that is part of the query for the form.

Here's the code:

CurrentDb.Execute "DELETE * FROM Header WHERE AssessmentID=" & Me.AssessmentID

Is this caused because of the requery? Maybe the form doesn't know the record has been deleted.
Question by:dlogan7
    LVL 10

    Expert Comment


    What is the form's recordsource at the time of the delete?


    Author Comment

    It's a query having about 7 tables. Table Header is one of those tables.

    Accepted Solution

    Figured this out myself. I needed to move the focus to another record before performing the requery.

    Author Closing Comment

    This question must have slipped through the EE cracks. I had never received a notice saying it was still open. I figured this one out a long time ago.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
    Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
    Viewers will learn the different options available in the Backstage view in Excel 2013.
    The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

    754 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

    18 Experts available now in Live!

    Get 1:1 Help Now