In Access 2010 I get a Write Conflict error - "This record
has been changed by another user..."
In Access 2007 this Code is working - why?
has been changed by another user..."
In Access 2007 this Code is working - why?
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim dbs As DAO.Database, rst As DAO.Recordset, strCriteria As Variant
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("Artikel", dbOpenDynaset)
strCriteria = "[Artikel-Nr] =" & Me.[Artikel-Nr]
rst.FindFirst (strCriteria)
If Not Me.NewRecord Then
rst.Edit
rst("Lagerbestand") = rst("Lagerbestand") + anzdif
rst.Update
rst.Close
Set rst = Nothing
Set dbs = Nothing