Microsoft KB Archive/235267

= ACC2000: Table in a Microsoft Access Project Cannot Be Updated =

Article ID: 235267

Article Last Modified on 6/30/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



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).



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
 Open the sample Access project, NorthwindCS.adp. 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

 In the Database window, click Tables, and then press F5 to refresh the Tables list. 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

Additional query words: prb

Keywords: kbprb kbclientserver kbusage KB235267

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.