Results 1 to 2 of 2
Thread: Write Conflict (2003)
2009-02-07, 12:50 #1
- Join Date
- Jan 2001
- Warrington, Cheshire, England
- Thanked 0 Times in 0 Posts
Write Conflict (2003)
I have a form which has five tab controls. The first tab control displays data a) in a Volunteer Duty sub-form and in normal controls. The sub-form controls are bound to fields in table VolunteerDuty and the other controls are bound to fields in table Volunteers . On an Awards tab control, there is a control - DateFirstVolunteered - bound to a field in table Volunteers .
When the first VolunteerDuty start date is entered in the Duty sub-form, the requirement is to copy that date into the DateFirstVolunteered field on the Awards tab. I decided to do this using an AfterUpdate event on control StartDate.
When I first tried this, I got a WriteConflict error whenever I attempted to move off the sub-form - whether by clicking on a field on the same tab or by trying to move to another tab.
I eventually fixed this by having the AfterUpdate event code save the record before copying the StartDate into the DateFirstVolunteered field.
Two questions :
1. Is what I have done 'safe'?
2. Why did the error occur? This is not a shared DB and I am the only user.
2009-02-07, 12:59 #2
- Join Date
- Mar 2002
- Thanked 29 Times in 29 Posts
Re: Write Conflict (2003)
The error message is slightly misleading. When you use code to manipulate a record, Access may see this as a different "user" than the interactive user.
If the new code doesn't cause error messages, you should be OK.