I have a field in a form that I can change using the code below. At first this field worked fine. Now I get a message "The data has been changed", "Another user edited this record and saved the changes before you attempted to save your changes. Re-edit the record"
This message does not appear every time I edit the record and I can't figure out why the message comes up as there are not other users using the data base.
Can someone tell me why?
Dim Dbs1 As Database
Dim rst1 As Recordset
Set Dbs1 = CurrentDb()
Set rst1 = Dbs1.OpenRecordset("General Ledger")
rst1.Index = "GLCode"
rst1.Seek "=", GLCode
If rst1.NoMatch Then
MsgBox ("GL Code Not Found...!")
Else
rst1.Edit
rst1!PayrollCode = Me.PayrollCode
rst1.Update
End If
rst1.Close
Thank you,
Gerry