A
Al
I am getting the following 3020 error after updating to
AC2000
Update without Addnew or Edit
The code is below
Any help is welcome
Thanks
Set db = CurrentDb
Set RstDoc = db.OpenRecordset("R-Approb",
Set rstdis = db.OpenRecordset("R-DistributionMAJ",
dbOpenDynaset, 0, dbOptimistic)
searSt = "[NomDoc] = " & "'" & Trim(Forms("ModifDoc")!
DocCherche) & "'"
RstDoc.MoveFirst
RstDoc.FindFirst (searSt)
If Not RstDoc.NoMatch Then
rstdis.AddNew
rstdis.Bookmark = rstdis.LastModified
rstdis.Fields("POSTE") = "0000"
rstdis.Fields("GQ0501_r02") = "X"
rstdis.Fields("Groupe") = RstDoc.Fields("Groupe")
rstdis.Fields("Zone") = RstDoc.Fields("Zone")
rstdis.Fields("Point") = RstDoc.Fields("Point")
rstdis.Fields("Element") = RstDoc.Fields("Element")
rstdis.Fields("Ext") = RstDoc.Fields("Ext")
rstdis.Fields("Edit") = RstDoc.Fields("Edit")
rstdis.Fields("Rev") = RstDoc.Fields("Rev")
rstdis.Fields("Page") = RstDoc.Fields("Page")
If GlobalApprobation Then
rstdis.Fields("Date_Emis") = RstDoc.Fields
("Date_Appr")
Else
rstdis.Fields("Date_Emis") = RstDoc.Fields
("Date_Emis")
End If
rstdis.Fields("EOREC") = RstDoc.Fields("EOREC")
rstdis.Update
rstdis.Close
AC2000
Update without Addnew or Edit
The code is below
Any help is welcome
Thanks
Set db = CurrentDb
Set RstDoc = db.OpenRecordset("R-Approb",
Set rstdis = db.OpenRecordset("R-DistributionMAJ",
dbOpenDynaset, 0, dbOptimistic)
searSt = "[NomDoc] = " & "'" & Trim(Forms("ModifDoc")!
DocCherche) & "'"
RstDoc.MoveFirst
RstDoc.FindFirst (searSt)
If Not RstDoc.NoMatch Then
rstdis.AddNew
rstdis.Bookmark = rstdis.LastModified
rstdis.Fields("POSTE") = "0000"
rstdis.Fields("GQ0501_r02") = "X"
rstdis.Fields("Groupe") = RstDoc.Fields("Groupe")
rstdis.Fields("Zone") = RstDoc.Fields("Zone")
rstdis.Fields("Point") = RstDoc.Fields("Point")
rstdis.Fields("Element") = RstDoc.Fields("Element")
rstdis.Fields("Ext") = RstDoc.Fields("Ext")
rstdis.Fields("Edit") = RstDoc.Fields("Edit")
rstdis.Fields("Rev") = RstDoc.Fields("Rev")
rstdis.Fields("Page") = RstDoc.Fields("Page")
If GlobalApprobation Then
rstdis.Fields("Date_Emis") = RstDoc.Fields
("Date_Appr")
Else
rstdis.Fields("Date_Emis") = RstDoc.Fields
("Date_Emis")
End If
rstdis.Fields("EOREC") = RstDoc.Fields("EOREC")
rstdis.Update
rstdis.Close