Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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

↑ Back to the top


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 '<FieldName>' 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.

↑ Back to the top


Cause

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

↑ Back to the top


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.

↑ Back to the top


Status

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

↑ Back to the top


More information

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.

  1. Start Microsoft Access, and then open the sample database Northwind.mdb.
  2. In the Database window, click Pages under Objects, and then click New.
  3. In the New Data Access Page dialog box, click Design View, and then click OK.
  4. 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.
  5. If the toolbox is not already visible, click Toolbox on the View menu. Add a new text box to the page.
  6. Right-click the text box, and then click Element Properties.
  7. On the Data tab, type the following expression in the Control Source property:
    =ProductID/UnitPrice
  8. On the View menu, click Page View.
  9. Click New on the navigation bar on the page to move to a new record.
  10. Type TEST in the ProductName field on the page, and then click Save on the navigation bar.
  11. 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 "Symptoms" section of this article.

↑ Back to the top


Keywords: KB295213, kbnofix, kberrmsg, kbprb

↑ Back to the top

Article Info
Article ID : 295213
Revision : 8
Created on : 9/27/2006
Published on : 9/27/2006
Exists online : False
Views : 387