BobD said:
Sorry. Wasn't thinking.
Access 2007 at workstation against SQL 2005 database.
Open a linked table and edit a data field. Save the changes by Cliicking
Record Selector.
I not sure what you mean by save changes by clicking on a record selector?
Could you expand on this?
Perhaps you mean you moving to another record? Is this a continues form?
To my knowledge, simply clicking on the recordselector will NOT save your
data.
So, are you moving to another record? Or are you working with more then one
form opened on the same record?
I would suggest that you ensure that a timestamp column is added to the
database side.\
(and then delete your table link..and re-link)
I've played with all the Access Options for locking but haven't found
solution. I don't want to change the ODBC refresh to 0 for fear that
it'll
bring my system to its knees. Before I try it, I thought I'd ask for help
here.
No no no, it is not your locking options...don't mess with that stuff...that
is a wild goose chase.
This problem is either you have two forms open to the same reocrd, or you
have some VBA code running that dirites the record. Remember, the current
form you are on has NOT been written to disk (to the table). This only
happens when you move to another reocrd, close the form, or your VBA code
forces a disk write.
So, keep in mind if you run any sql statements or even some recordset code
(ado/dao) that creates an recordset, and updates the same record, then you
get your current message (beucase your current record you are viewing has
NOT been commited to the table, and any other code that modifies the table
direct in place of text boxes and values in the form will thus give you that
error message).
So, if your form text boxes have any after update code running that updates
the table and NOT the fields/text boxes in the form, then that is your
problem.
The two cause/solutions are:
1) You are running code that updates the table in place of the current forms
text boxes. However, the forms current record is thus NOT yet written to
disk. If some code or process updates the table directly, then saving the
forms record will overwrite the data (and you get that message about the
record having been changed). If you have any code that runs, simply force
the current form to be written to the table, and THEN run that update code.
You simply have to ensure that the current forms data is NOT dirty anymore.
You can use:
if me.Dirty = true then
me.Dirty = false
end if
.....code here that runs and updates the table...
2) There is no timestamp column in the database, and that makes it difficult
for access to figure out if the record been changed.