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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Write conflict error - 1 user!!

Status
Not open for further replies.

rwttm001

IS-IT--Management
Nov 20, 2002
26
GB
Hi all

I'm gettting a Write Conflict error from Access when closing a form. Basically I wrote a function which populates a Yes/No field when any field in the record is updated, using the code:

Public Function ModifyCC()

Dim MySQL As String
Dim MyDB As Database
Set MyDB = CurrentDb

MySQL = "UPDATE tblChangeControlLog SET chkModified = True WHERE intcclogid = " & Forms!frmChangeRequestForm.intCCLogID & ""
MyDB.Execute MySQL

MyDB.Close

End Function

However when I change something, sometimes I get the error to say that the record has been changed by another user therfore I will overwrite their changes if I continue. However the database is currently on my machine used only by myself. I don't know why I'm getting the error, or indeed why it seems to be intermittent for no apparent reason. Any help would be greatly appreciated.

Matt
 
Matt

Where do you call the function from?

Vic
 
Perhaps you could throw in a Me.Refresh prior to calling this function?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top