7878 error the data has changed

pablavo

Registered User.
Local time
Today, 06:46
Joined
Jun 28, 2007
Messages
189
Hi folks

I'm working on a db that I've recently upsized to SQL Server. One of my forms is for changing employees job titles which happens often. It's a continuous form that has two main fields, the name of the employee, and, the job title.

The job title field is a drop down list which is bound to the titleID from the job table. A user picks from the drop down list, the new job title and that's it. However, I'm getting an MS error 7878:

The data has been changed.

Another user edited this record and saved the changes before you attempted to save your changes.

Since I am the other user I don't see how this is happening.

This only started happening when I upsized to SQL Server so I'm sure it's some kind of update problem, perhaps because I'm using a continuous form with a combo box to select the value. I'm not sure about that.

Has anyone had the same problem or know what I can do to solve this?

Thanks for any help.
 
you posibly have a field in the record that is being set by code, in the current event or some other way)

(show the record selector bar, and see if it turns to a pencil - which would indicate this has happened)

when you then try to change the underlying record in some way (a sql statement?) Access tells you the record has already been changed
 
Got any code running on the form? Many times this can happen if you have a bound form to which you make changes but then also have code that makes changes which then generates this error because the record has not yet been saved.
 
Thanks folks for getting back to me.

I should have actually specified that I had code in the form. Basically I don't want duplicate values in the table so I've used Dcount and if the number is more than 0 then it'll generate an error saying that the value has already been taken.

It worked fine before I upsized, Maybe because it undo's the value that the user entered at roughly the same time if there are duplicates, this is causing access to think it's getting changed by another user. I don't know.

I've not allowed duplicate values at the table level in SQL Server so perhaps I should utilse the ODBC call error and use the form_error event to sort it out.

Thanks
 

Users who are viewing this thread

Back
Top Bottom