Error : The data has been changed.

V

Vensia

Dear all,

I get the following error at the AfterUpdate event of the combo box.

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

Why does this error happen ?
Thanks before.

Regards,
Vensxia
 
M

Michel Walsh

Hi,


Is it possible your VBA CODE changed and saved the record that is also
the actually displayed record, through another recordset or an SQL
statement? Your VBA code *is* another user than the one in front of the
keyboard.



Hoping it may help,
Vanderghast, Access MVP
 
V

Vensia

Ok, I have changed the code like this :

set rs = me.recordsetclone
with rs
.edit
...
....
.update
end with

The error doesn't happen anymore. Is the above code true ?
Thanks.
 
M

Michel Walsh

Hi


Indeed. Another possibility would have been to save the actual record, with
a Me.Dirty=False, BEFORE making the update (with your VBA code).


Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top