The attached sample is use ADO data control to maintain data. But my delete method of the ADO data control can not work. I have the error: Multiple-steps operations generated errors. Check each status value. Please help !
Last edited by vivian2u; Apr 26th, 2005 at 11:47 PM.
This required a little research. It seems that when using the ADO Data Control, you have to Bookmark the record before it can be deleted. Make the following change to your code, and you should be just fine.
VB Code:
Private Sub cmdDelete_Click()
Dim str As Byte
str = MsgBox("Are you sure you want to delete this record?", vbQuestion + vbYesNo)
If str = vbYes Then
With Adodc1.Recordset
.Bookmark = .Bookmark '<==== ADD THIS LINE TO YOUR ROUTINE