60 pts.
 MS Access 2002 Previously updated fields revert to previous values
I have a single user application where I update a status table through VB code using DAO. This particular table has 1 record and 66 fields. As part of the processing, two of these fields are updated after which the table is closed.

Later in the processing, I update a different field again for this single record using the mechanism … DoCmd.RunSQL "UPDATE tblCurrentStatus SET Fib382IBLRCounter = 0”. The problem is that while the new data is updated, the two fields that I previously updated as described above have now returned to their previous values. It is almost as if a previous version of the record and/or table was reinstated prior to the latest update.

Any thoughts on what might be happening? Bruce



Software/Hardware used:
MS Access 2002, VB
ASKED: Mar 29, 2010  8:24 PM GMT
UPDATED: March 30, 2010  6:14:38 PM GMT
900 pts.

Answer Wiki:
Did you use the .Update method after you edited the record? When you use .edit it just builds a copy in a buffer and does not put it into the table until you .update.
Last Wiki Answer Submitted:  Mar 30, 2010  5:37 PM (GMT)  by  Tlsanders1   900 pts.
To see other answers submitted to the Answer Wiki View Answer History.
Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _




 

Yes, .update was used and I could see the new data in the table while stepping through the code in debug mode.

I have just found the problem which appears to originate from some VB code changes. I went back to a working version of the system that was several days old and in the function where it appeared the problems were coming from, I copied the VB code from the new version function back into the previous functioning version and was able to replicate the problem. I manually reapplied the code changes to the previously working function in question, verified its functioning then copied this into the new version and everything works as it should. Although the code was exactly the same (used a code comparison utility) I can only surmise there was something obviously corrupted in the VB code that was causing this problem.

I can only further assume that Access maintains a certain amount of data or previous versions of records/table in some sort of temporary buffer after the data is committed to the table which is why I was seeing previous data reappearing. Not sure why this would be the case but is the only plausible conclusion I have been able to see.

Thanks for the help,
Bruce

 60 pts.