Microsoft KB Archive/295213

= You cannot edit or delete a record on a data access page =

Article ID: 295213

Article Last Modified on 9/27/2006

-

APPLIES TO


 * Microsoft Office Access 2003
 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q295213



Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SYMPTOMS
When you try to edit a record that has an expression on a data access page, you receive the following error message

A value could not be saved into the data source's '' field.

Operation failed with a status of 0.

Discard changed value?

where FieldName is the name of the field that you are editing.

When you try to delete a record, you receive the following error message:

Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.



CAUSE
The expression is evaluated when the underlying recordset is modified. These errors occur if the expression is not valid.



RESOLUTION
When you edit or delete records, make sure that you have valid values in the expression that can be evaluated correctly. For example, if the expression divides by a field value, make sure that the value is not zero.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Behavior
CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.

 Start Microsoft Access, and then open the sample database Northwind.mdb. In the Database window, click Pages under Objects, and then click New. In the New Data Access Page dialog box, click Design View, and then click OK. Right-click and then drag the Products table from the Field List to the unbound section on the page. When you are prompted, click Columnar.</li> If the toolbox is not already visible, click Toolbox on the View menu. Add a new text box to the page.</li> Right-click the text box, and then click Element Properties.</li> On the Data tab, type the following expression in the Control Source property:

=ProductID/UnitPrice

</li> On the View menu, click Page View.</li> Click New on the navigation bar on the page to move to a new record.</li> Type TEST in the ProductName field on the page, and then click Save on the navigation bar.</li> Type TEST in the QuantityPerUnit field on the page, and then press the TAB key. Note you receive the first error message that is mentioned in the &quot;Symptoms&quot; section of this article.</li></ol>

Additional query words: pra dap page ACC2002

Keywords: kbprb kberrmsg kbnofix KB295213

-

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

© Microsoft Corporation. All rights reserved.