The following code returns 0 Affected records.
How can I get how many records were updated?
The table is updated successfully.
Thanks.
How can I get how many records were updated?
The table is updated successfully.
SQL:
Public Function test()
Dim db As DAO.Database
Dim sql As String
Set db = CurrentDb
sql = "Update tbl Set field1=p0 WHERE PK=1"
With db.CreateQueryDef("", sql)
.Parameters(0) = 12
.Execute dbSeeChanges
End With
Debug.Print db.RecordsAffected
End Function
Thanks.