D
Don Starnes
I have a “persons†form (bound to a “persons†table) that has a
“PersonsGroups†listbox that is bound to a “joins_persons_groups†table; the
“PersonsGroups†listbox lists joins between the “persons†table other tables
that the user selects from the “groups†listbox. I have VBA code linked to a
button that makes joins between the tables and updates the “PersonsGroupsâ€
listbox.
If I then click on the “PersonsGroups†listbox (to select an item), a dialog
box displays this error:
"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."
I have tried saving the record before adding the join record to the join
table and before requerying the listbox using a ForceMeToSave function that
uses this code:
Function ForceMeToSave(ByVal cvform As Form) As Boolean
If cvform.Dirty Then cvform.Dirty = False ' save the current record first
ForceMeToSave = True
End Function
This setting of the .Dirty = False didn’t solve the problem.
Why am I getting this error? Is it meaningful (the tables all seem to have
the correct values)? Can I get rid of the error message (it doesn’t seem to
be trapped by my On Error error trapping)..
Thanks for any thoughts on this.
Don
“PersonsGroups†listbox that is bound to a “joins_persons_groups†table; the
“PersonsGroups†listbox lists joins between the “persons†table other tables
that the user selects from the “groups†listbox. I have VBA code linked to a
button that makes joins between the tables and updates the “PersonsGroupsâ€
listbox.
If I then click on the “PersonsGroups†listbox (to select an item), a dialog
box displays this error:
"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."
I have tried saving the record before adding the join record to the join
table and before requerying the listbox using a ForceMeToSave function that
uses this code:
Function ForceMeToSave(ByVal cvform As Form) As Boolean
If cvform.Dirty Then cvform.Dirty = False ' save the current record first
ForceMeToSave = True
End Function
This setting of the .Dirty = False didn’t solve the problem.
Why am I getting this error? Is it meaningful (the tables all seem to have
the correct values)? Can I get rid of the error message (it doesn’t seem to
be trapped by my On Error error trapping)..
Thanks for any thoughts on this.
Don