Link to home
Start Free TrialLog in
Avatar of claracruz
claracruz

asked on

"Multiple-step operation generated errors.

i GET THE ABOVE ERROR when i try to delete records from my recordset via the user-interface. here's my code;-

If MsgBox("Delete Entries For " & _
        adoPayTracker.Recordset.Fields("MT.DateWorked") & _
        "?", vbYesNo) = vbNo _
            Then Exit Sub

    adoPayTracker.Recordset.Delete (adAffectCurrent)
    adoPayTracker.Recordset.MoveNext
I use the exact same code elsewhere in my program and it works fine.
the textboxes are bound to adopaytracker.
Avatar of Mikal613
Mikal613
Flag of United States of America image

Is the table you are deleting from related to any other table in your database?
If so, and the record you are deleting is referenced in that table, you will get
this error

Dim dDateWorked

dDateWorked = NZ(adoPayTracker.Recordset.Fields("MT.DateWorked") ,0)
if dDateWorked = 0 then : Exit Sub

If MsgBox("Delete Entries For " & dDateWorked & _
        "?", vbYesNo) = vbNo _
            Then Exit Sub

    adoPayTracker.Recordset.Delete (adAffectCurrent)
    adoPayTracker.Recordset.MoveNext


Alan :)
Avatar of claracruz
claracruz

ASKER

i'm sorry, but known of this has helped. i am deleting from 2 tables that are linked and error is on code:-
                     adoPayTracker.Recordset.Delete (adAffectCurrent)
ASKER CERTIFIED SOLUTION
Avatar of Pi7
Pi7

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
INFO: Troubleshooting Guide for 80004005 Errors in Active Server Pages and Microsoft Data Access Components
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q306518