Write conflict

E

Emma

Hi I've recently started adding user to the Database and one user in
particular is getting the following error message everytime she writes to a
file: "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, then paste your changes back in if you decide to make
changes." What is wrong and is there any remedy?
 
D

dhstein

I had this problem. For me it was happening when I was adding a product to
the product file. But I was also making another change in the
FormBeforeUpdate event. I think the two changes in two events were somehow
in conflict. This may or may not be the same problem you have. What I did
in my case was to create a field in the table I was changing that indicated
that the record needed updating. Then on the Form OnUnload event I opened
the table and updated the records that needed updating. Again - I'm not sure
if that helps you, but that was my experience.
 
E

Emma

Yes I am using the FormBeforeUpdate also. Is it because the first user
doesn't create a file until they exit the page? So technically the second
user can be in it also?
 
D

dhstein

Emma,

I'm far from an expert on these issues - so take what I tell you with a
grain of salt. But I saw no one had responded previously, so I thought I
would share my similar experience. My guess for this problem is that because
the form is bound to a table, it is "open" and the two user actions are
conflicting. I think your explanation makes sense as well. In my case I
rewrote my code somewhat. I took one of the "update" processes and changed
it to just set a bit in the table - indicating that the record needed
updating. Then on the close form event, I went through the table, found
those fields, and made the changes I needed. Your requirements may not lend
themselves to that approach - I don't know. Also, my guess is there is a
better way - there is a "dirty" bit or a dirty flag that I'm sure may be
useful also. But as I said, I'm no expert, so you might try to post your
question again and maybe one of the gurus here will respond. Good luck.

David
 
O

OldDog_NewTricks

I'm getting the same error. I have a SQL Server backend with Access front
end. We added a new table to in the SQL database (StudyInfo, StudyInfoID is
the primary key) and linked the new table to Access.

We have a form that captures training session details in another table
(Sessions, SessionID is the primary key) There are three tables linked to
the Sessions table, StudyInfo, Trainer, Client. Sessions captures the
primary key for the related records in the other tables.

The trainer, client and study info are picked from combo boxes on the
Sessions form. The record source for each combo box is a query.

We didn't have a problem until we linked the StudyInfo table.

I checked the table properties to make sure that nulls are accepted by every
field except the primary key ID fields. After reading some of the threads, I
added a keystamp field. There isn't any 'before update' coding in the
background. There aren't any indexes on the tables that I can see. What am
I missing??
 
D

dhstein

Emma, Old dog,

Try to set the record lock property on the form to "Edited Records"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top