Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

non-existent other user keeps snagging my records 3

Status
Not open for further replies.

cdck

Programmer
Nov 25, 2003
281
US
I have data stored in SQL server, and am attempting to use an Access 2000 form to enter and edit that data. I'm still building the application, so there is absolutely no-one else who even has access to it.

When I open the form for the first time after starting the Access application, I can enter a new record in the table. If I move off of that record and return, I can type all that I want to in the data, but the moment I move off that record I get an error informing me that

"This record has been changed by another user since you started editing it. If you save the record, you will overwrite the changes the other user made.

Copying the changes to the clipboard will let you look at the values the other user entered, and then paste your changes back in if you decide to make changes."

It offers 3 buttons:

1. Save Record - this button is greyed out and cannot be used.
2. Copy to Clipboard - if I select this button, the record returns to the state it was in before I made any changes and data is saved on the clipboard.
3. Drop Changes - same deal as #2, but nothing was put on the clipboard.

I have no real option but to close the form. No change to the record can be performed. It acts the same even if I go into the linked table and attempt to make the change without the form.

If I go into the Enterprise Manager and edit the data there, it works fine.

There is a primary key in the table, which is recognized by Access.

Again, there is no other user to be doing this.

Any thoughts, anyone?

Cheryl dc Kern
 
try adding a timestamp data type to the sql table
 
Thank you, this corrected the issue. However, I'd like to know why this happened with this table, but hasn't happened with other tables managed the same way. Given that this fixed the issue, what would you say is the actual cause?

Cheryl dc Kern
 
Perhaps a Bit field allowing null value.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
cdck,
This happened because Access had no way of knowing whether the record changed. It now does with a timestamp field.

Without that field, Access resorts to field-by-field checking upon load and then the same check upon save to test for dirty record.

You may have had Date/time fields on the form. When access converts the "text" value of these fields upon save to a double-float (to compare against the value it saw on load), it may result is a slight difference at the far right of the decimal scale--even though textually it's the same date-time. SO it thinks the record changed when it didn't.

Removing the datefields from the form (not the table itself) can clear this up. If they're needed on the form, then the timestamp field is the only real solution--which is needed also if you're to use dao recordsets to edit such data.
--Jim

 
Thank you very much, this answer helps a great deal! Have a star!

Cheryl dc Kern
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top