Write Conflict

geoffD

New member
Local time
Today, 05:01
Joined
Jan 3, 2004
Messages
7
I have a form with two sub-forms. The subFormOne is a continuous form that list Entries in a competition with EntryId as key field. The Link-Field, for both, is CompetitionId.

the second sub-form is linked on CompetionID & subFormOne!EntryId.
The second sub-form has two UNBound fields, dtStartTime and dtEndTime, from which I find the differance and calculate a time penalty. I store the start and end times in the Entry Table using a recordset.

By clicking on an Entrants name (selecting a record) in subFormOne, subFormTwo syncs to the results input.

Here is the problem. The 'AfterUpDate' Event of the dtEndTime tries and fails to store the times in the entry table using a recordset. There is no indication of any problem untile I choose a different entrant in subFormOne. Then I get the error message:

'Write Conflict"
This record has been changed by another user since you started editing it. If you save the record...........etc.

Since I have opened this in exclusive mode I just don't understand what the message means. I have looked at my code to see if perhaps I was trying to write the data twice, but it appears not.

Any ideas as to what I should look for would help.
 
Pat Hartman said:
You are conflicting with yourself. Errors like this happen when you update a bound record by using ADO/DAO or a query that you run while the record being updated is the current record of the form. Since the record you want to update is the current record, just place the necessary values in it directly.

Me.SomeField = "SomeValue"
Thanks for the reply. You of course are correct. I finally got everything working, so thanks.
 

Users who are viewing this thread

Back
Top Bottom