Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The data has been changed. Re-edit the record

Status
Not open for further replies.

TracySHC

MIS
May 5, 2005
66
US
Please let me know if I am in the right forum for this question. I have a Microsoft Access 2003 mdb which calls Form A. Form A collects the criteria for Form B, which displays a list from which the user selects. When the user clicks on the selection field, the error message, "The data has been changed. Another user edited this record and saved the changes before you attempted to save your changed. Re-edit the record." Once the OK button is clicked, the user can select. What is causing this message?
Thank you in advance for any and all help and advice,
TracySHC
 
This message is caused by a record being updated in two different places, for example in a recordset and on a form or on two forms. Does form B update the data?
 
Remou,
Yes, both forms update data in the same file. I am using a SQL statement rather than a recordset to update the data - does this make a difference? What should I do to address the problem?
Thank you for your response,
TracySHC
 
I do not know how your code runs, but you can probably get things to work by saving the form before you run any sql.
 
Remou,
What is the code for saving the form in Visual Basic?
Thank you for your idea,
TracySHC
 
Remou,
When I used this command, I received a runtime error of 2455, that stated that "You entered an expression that has an invalid reference to the property Dirty." Any further suggestions or questions?
Thank you,
TracySHC
 
It seems that you may be saving in the wrong place. I should not have use the phrase "saving the form" you need to save the record, but you can save from the form, which is what Me.Dirty does. You can also use

DoCmd.RunCommand accmdSaveRecord

But if the first does not work, the second will not work, either.
 
Remou,
Yes, sorry, I had tried the acCmdSaveRecord before the Me.Dirty command. Same problem. How else should I approach the situation?
Thank you,
TracySHC
 
I cannot say without some code. And even then, its touch and go ;)
 

The message "an invalid reference to the property Dirty" would suggest that the form is unbound. Is this true?

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Missingling,
Forgive me for this question, but it's very likely that my form is unbound. How can I find out? How can I fix it?
Thank you for your suggestion,
TracySHC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top