You cannot edit or delete a record on a data access page (295213)



The information in this article applies to:

  • Microsoft Office Access 2003
  • Microsoft Access 2002

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

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.

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.

Modification Type:MinorLast Reviewed:9/27/2006
Keywords:kbprb kberrmsg kbnofix KB295213 kbAudDeveloper