Editing a saved record from a linked table w/o leaving it

  • Thread starter Thread starter kfguardian
  • Start date Start date
K

kfguardian

I have a linked table to an SQL server. If I save the record on my form with
a button and then try to edit more info I get the following 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. <ok>"

If I hit ok, all the fields show #Deleted. How do I get around this? I
know I am the only user because I am still developing the form?
 
Hi kfguardian

What code does your button execute to save the record?

Either
Me.Dirty = False
or
DoCmd.RunCommand acCmdSaveRecord

should save the record and not give you any error when you try to make
further changes.
 
I use
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

And if I use a copy of the linked table for the purposes of working at home
it is fine. But as soon as I use the linked table I get this error. If I
leave the record and come back to it to make changes it is ok (I believe
anyway- can't test today).

Graham Mandeno said:
Hi kfguardian

What code does your button execute to save the record?

Either
Me.Dirty = False
or
DoCmd.RunCommand acCmdSaveRecord

should save the record and not give you any error when you try to make
further changes.
--
Good Luck :-)

Graham Mandeno [Access MVP]
Auckland, New Zealand

kfguardian said:
I have a linked table to an SQL server. If I save the record on my form
with
a button and then try to edit more info I get the following 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. <ok>"

If I hit ok, all the fields show #Deleted. How do I get around this? I
know I am the only user because I am still developing the form?
 
I figured it out, it needed a primary key in the table.

kfguardian said:
I use
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

And if I use a copy of the linked table for the purposes of working at home
it is fine. But as soon as I use the linked table I get this error. If I
leave the record and come back to it to make changes it is ok (I believe
anyway- can't test today).

Graham Mandeno said:
Hi kfguardian

What code does your button execute to save the record?

Either
Me.Dirty = False
or
DoCmd.RunCommand acCmdSaveRecord

should save the record and not give you any error when you try to make
further changes.
--
Good Luck :-)

Graham Mandeno [Access MVP]
Auckland, New Zealand

kfguardian said:
I have a linked table to an SQL server. If I save the record on my form
with
a button and then try to edit more info I get the following 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. <ok>"

If I hit ok, all the fields show #Deleted. How do I get around this? I
know I am the only user because I am still developing the form?
 
Back
Top