I need to delete all records in the Security table that relate to the investor umber. This is the code I used in my vb6 application.
When I run this I get a dialog box which says "Operation is not allowed when object is closed."

Even though this message appears, the table's records do delete.

adoDelete.RecordSource = "DELETE FROM Security Where Investor_Number = " & txtInvestorNumber
adoDelete.Refresh


Any ideas on why this dialog shows or what I need to keep it from being displayed?

Thank you,
Dwight