Private Sub update ()
Dim db As Database
Set db = CurrentDb
Dim rs As Recordset
Set rs = db.OpenRecordset("SELECT * From Table", dbOpenDynaset, dbSeeChanges)
db.Execute ("UPDATE Table SET Path = '" & A.Value & "' WHERE B = '" & B.Value & "'")
db.Close
End Sub
When I got vba access Error 3622 (i.e use the dbSeeChanges option with OpenRecordset when accessing a SQL Server table that has an IDENTITY column) a proposed solution was to add the first line (Set rs=... see above in the coding) which I did but it did not resolve the problem. Is there another way to avoid this error ?
I am new in coding and would appreciate any help on this. Thank you.