Dear Community,
I am trying to update all entries from table "tbValve" when a specific criteria is verified (regarding Fabric value).
When implementing the code bellow, an error 3020 occurs (Update or CancelUpdate without AddNew or Edit).
Need help because I cannot understand why is this happening.
Thank you!!
I am trying to update all entries from table "tbValve" when a specific criteria is verified (regarding Fabric value).
When implementing the code bellow, an error 3020 occurs (Update or CancelUpdate without AddNew or Edit).
Need help because I cannot understand why is this happening.
Thank you!!
Code:
Dim rs As DAO.Recordset, query1 As String query1 = "Select TagValve from tbValve Where Fabric = '" & cbEdit.Column(1) & "'" Set rs = CurrentDb.OpenRecordset(query1) With rs If Not .BOF And Not .EOF Then .MoveFirst .Edit Do While Not rs.EOF !TagValve = Replace(cbEdit.Column(0), cbEdit.Column(0), TagValve) .MoveNext Loop .Update .Close End If End With Set rs = Nothing
Comment