M
Mark A. Sam
I am changing a program from an MDB to a Project and having a problem
assigning a value to an Autonumber field:
Dim rst As New ADODB.Recordset
rst.Open "seller", CurrentProject.Connection, adOpenStatic,
adLockPessimistic
rst.Find "[coID] = " & 0
rst.AddNew
rst![coID] = 0
rst![Company] = "Do not delete"
rst.Update
Seller is a table. I get the error:
Run-time error '-2147217887 (80040e21)
Multiple-step operation generated errors. Check each status value.
I also need to assure that there is a record with a [coID] value of 0.
My DAO code was
rst.FindFirst "[coID] = " & 0
If rst.NoMatch Then
rst.AddNew
rst![coID] = 0
rst![Company] = "Do not delete"
rst.Update
End If
I also don't know how to test if the Value was found, since there is no
NoMatch property.
Thanks for any help.
Mark A. Sam
assigning a value to an Autonumber field:
Dim rst As New ADODB.Recordset
rst.Open "seller", CurrentProject.Connection, adOpenStatic,
adLockPessimistic
rst.Find "[coID] = " & 0
rst.AddNew
rst![coID] = 0
rst![Company] = "Do not delete"
rst.Update
Seller is a table. I get the error:
Run-time error '-2147217887 (80040e21)
Multiple-step operation generated errors. Check each status value.
I also need to assure that there is a record with a [coID] value of 0.
My DAO code was
rst.FindFirst "[coID] = " & 0
If rst.NoMatch Then
rst.AddNew
rst![coID] = 0
rst![Company] = "Do not delete"
rst.Update
End If
I also don't know how to test if the Value was found, since there is no
NoMatch property.
Thanks for any help.
Mark A. Sam