ADP WRITE CONFLICT EDITING RECORD (1 Viewer)

sbornstein1

Registered User.
Local time
Today, 01:50
Joined
Jun 19, 2001
Messages
24
I am getting a write conflict on some parts of my subforms going back to my main form. I get a Write Conflict box and it says the record has been changed by another user. I am the only user on it at that point. Any idea what I should look for what could cause this? Thanks
 

KevinM

Registered User.
Local time
Today, 01:50
Joined
Jun 15, 2000
Messages
719
The 'write conflict' is by design.

Basically you are updating the same recordset from two different places before the first update has been written to the current record...hence the message.

Unfortunatley there is no workaround in your current form set up.
You may have to redesign it and look at a different approach.
 

sbornstein1

Registered User.
Local time
Today, 01:50
Joined
Jun 19, 2001
Messages
24
Kevin this is where I am getting the write conflict any ideas?
I have narrowed down where the write conflict is happening. I have a function that is below.
What is happening is when a certain field is updated it runs the following function. The first time
it works fine, the next time through this function on this like:
DoCmd.RunCommand acCmdSaveRecord
This is when I get the write conflict the second time this function gets fired is when the WRITE CONFLICT
appears. Any help?

Function formSaveRecord(f As Object) As Boolean
Dim foo
Dim OldForm As Form

On Error GoTo Err_FormSaveRecord
If Not f.Dirty Then
formSaveRecord = True
Exit Function
End If

Set OldForm = Screen.ActiveForm
formSaveRecord = True
DoCmd.SelectObject A_FORM, f.Name
'DoCmd.DoMenuItem A_FORMBAR, A_FILE, A_SAVERECORD, , A_MENU_VER20
DoCmd.RunCommand acCmdSaveRecord
Exit_FormSaveRecord:
On Error Resume Next
DoCmd.SelectObject A_FORM, OldForm.Name

Exit Function
 

Users who are viewing this thread

Top Bottom