Microsoft Knowledge Base Email Alertz

(235267) - You find that you cannot delete, update, or insert new records in a table in an Access project.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 235267 - Last Review: June 30, 2004 - Revision: 2.0

ACC2000: Table in a Microsoft Access Project Cannot Be Updated

This article was previously published under Q235267
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies only to a Microsoft Access project (.adp).

On This Page

SYMPTOMS

You find that you cannot delete, update, or insert new records in a table in an Access project.

CAUSE

The table does not have a unique index.

RESOLUTION

To work around this behavior, check that the table has a unique index. If the table does not have a unique index, create a unique index by using a stored procedure such as the one in the "How to Correct the Behavior" section that follows step 4 of the "Steps to Reproduce Behavior" section later in this article.

MORE INFORMATION

CAUTION: If you follow the steps in this example, you modify the sample Access project NorthwindCS.adp. You may want to back up the NorthwindCS.adp file and follow these steps on a copy of the project.

Steps to Reproduce Behavior

  1. Open the sample Access project, NorthwindCS.adp.
  2. In NorthwindCS.adp, create the following stored procedure, and then run it:
    Create Procedure "MakeTestTable"

    As

    SELECT * INTO tblTest FROM customers

    CREATE INDEX tblTest_Index ON tblTest (customerid)

    return
  3. In the Database window, click Tables, and then press F5 to refresh the Tables list.
  4. Open the tblTest table in Datasheet view. Note that when you open the table in Datasheet view, you cannot edit or add records.

How to Correct the Behavior

You can correct this behavior by running the following stored procedure:
Create Procedure "FixTestTable"

As

DROP INDEX tblTest.tblTest_Index

CREATE UNIQUE INDEX tblTest_Index ON tblTest (customerid)

return

APPLIES TO
  • Microsoft Access 2000 Standard Edition
Keywords: 
kbprb kbclientserver kbusage KB235267
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Wolfgang Steuer - wac NOSPAM-AT-NOSPAM steuer.demon.co.uk Report As Irrelevant  
Written: 7/20/2005 6:14 AM
Thank you so very much. It was driving me crazy until I found your article, when all fell into place. I now have added unique / primary key indexes to the temporary tables and everything works fine!

Mindy Tran Report As Irrelevant  
Written: 10/6/2006 6:42 AM
thank you so much. I did try this solution, but its didn't work. Both of my tables have PK and UI, however, I still can't edit info. My form select info from both tables(1 is linked, one is local) to display, but when saving, its only save to the linked table (which is what I want) its can save, and delete, but not editing. The status bar giving an msg "this recordset is not updatable". Does anyone have solution? or having this problem before? well, thank you for the article Scott. -Mindy