Dear Friends,

I have Datagrid "dbd" and recordset "rst", i want to delete some records that user selected from Datagrid by using the following code;

Private Sub Command1_Click()
Dim varBmk As Variant
For Each varBmk In dbd.SelBookmarks
rst.Bookmark = varBmk
rst.Delete
dbd.Refresh
Next
End Sub

it works till rst.delete command and an error is generated which is run time error -2147467259
"Insufficient base table information for updating or refreshing."

Could anybody tell me what it is or how can i do the same work by something else...

PS: My connection code is

With cnn
.CursorLocation = adUseClient
.Open "Hisse": End With

rst.Open sql, cnn, adOpenDynamic, adLockOptimistic

Thanks,