Microsoft KB Archive/302492

= ACC97: &quot;The Data Has Been Changed. Another User Edited This Record...&quot; Error Message with Linked SQL Tables =

Article ID: 302492

Article Last Modified on 1/31/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q302492



Advanced: Requires expert coding, interoperability, and multiuser skills.

This article applies only to a Microsoft Access database (.mdb).



SYMPTOMS
When you edit a field on a subform that has a linked SQL table as its record source, and you try to edit a field on the main form that is based on the same linked SQL table, you may receive the following message:

The data has been changed. Another user edited this record and saved the changes before you attempted to save your changes. Re-edit the record.

When you click OK, you can continue to edit, and then you can save the record.



CAUSE
This error occurs when you start to edit a record that has changed since you began viewing it. The record is updated in the table, but the record source of the main form has not been refreshed to reflect the change.

This behavior is related to the ODBC Refresh Interval setting on the Advanced tab of the Options menu. If you have an ODBC interval of 1500 seconds and you wait 1500 seconds before you edit the record on the main form, you will not receive this error. However, setting the ODBC Refresh Interval to a low enough number to allow you to edit the record without receiving this error would cause an increase in network traffic.



RESOLUTION
To resolve this error, add Me.Parent.Requery to the AfterUpdate event of the subform.



Steps to Reproduce the Behavior

 * 1) Start Access, and then create a new blank database.
 * 2) Link to the dbo.Customers table in the Northwind database on a SQL Server.
 * 3) Use the Form Wizard to create a new form that is based on the dbo.customers table.
 * 4) Add the CustomerID, the CompanyName, the ContactName, and the ContactTitle fields.
 * 5) Add a subform and use the dbo.Customers table as the record source.
 * 6) Add the CustomerID and the Address fields and use the CustomerID field as the linked field.
 * 7) Open the form in Form view.
 * 8) Move to the Address field on the subform and make a change.
 * 9) Move to the ContactTitle field on the main form and edit the field. Note that you receive the error message that is mentioned in the &quot;Symptoms&quot; section of this article.

Additional query words: prb

Keywords: kberrmsg kbprb KB302492

-

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

© Microsoft Corporation. All rights reserved.