Link to home
Start Free TrialLog in
Avatar of ca1358
ca1358

asked on

"run-time error 2001 You canceled the previous operation."

I have this piece of code in five forms, just the queries are different and One form I get this error.  "run-time error 2001 You canceled the previous operation."

When it hits this line in the code
 DoCmd.RunMacro "Macro 4-5 Find PairOutBefore"


Any suggestions would greatly be appreciated.  

I have researched and the answers had to do with lookup function which has nothing to do with this piece of code.

This macro is just refresh and append queries.

//////////////////////

 iResponse = MsgBox("Are You Sure?", vbOKCancel, "Processing")
 Select Case iResponse
   
   Case vbOK
   
   
     If Me.Dirty = True Then _
       Me.Dirty = False 'DoCmdRequery
     
     
        DoCmd.RunMacro "Macro 3-2 MakeTradeLimitRoll Table_TradeLimitPairoutTable"
        DoCmd.RunMacro "Macro 4-5 Find PairOutBefore"
        DoCmd.RunMacro "MacroDeleteBlankRecordsForPairOuts"
        Forms![frmMaintenance]![frmPairOut].Requery
     
     
    Case vbCancel
   
        Exit Sub
   End Select
ASKER CERTIFIED SOLUTION
Avatar of dmitryz6
dmitryz6

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
Avatar of ca1358
ca1358

ASKER

Thank you!
You welcome