Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-time error '3426' this action was cancelled by an associated objec

Status
Not open for further replies.

112055

Programmer
May 13, 2002
61
US
Hi,
This form is to allow customer to add customer name, ID, password and other previleges. But when I go do a Delete, I get a run time error 3426 - this action was cancelled by an associated object. It points to
Datax(tx).Recordset.MoveNext
I have out a MsgBox before and after this line to see what Datax(tx) is fetching. The Datax1(tx) = customer but cannot get through after that. The odd thing is it still delete the record after that.

Can anyone shed some light as to what I can do to resolve this?

thanks,
Ann
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sub cmdDelete_Click()
If txtID(tx) = "" Then Exit Sub

If MsgBox("Delete Item " & txtID(tx) & "?", 36) = 6 Then
Datax(tx).Recordset.Delete

MsgBox("Datax1(tx) = " & Datax(tx))

Datax(tx).Recordset.MoveNext

MsgBox("Datax2(tx) = " & Datax(tx))

If Datax(tx).Recordset.EOF = True Then
Datax(tx).Recordset.MoveFirst
End If
End If

End Sub
 
Hi LostInCode (Programmer), is it wrong or something I should know about when deleting through bounded controls on DataGrid?
 

Before going any further, make sure you are using service pack 5 for VB6 (there is one bug that causes this, which gets fixed in the sp, but otherwise, it does happen under other circumstances).

(I imagine there is a big time difference between us, and I was done for the day when you responded)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top