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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 2001 'You canceled the previous operation'

Status
Not open for further replies.

XTnCIS

Programmer
Apr 23, 2002
57
US
I need somekind of help here! [shocked]

I'll try to make this short but I'm frustrated. I have had my access database crash several times in the last few weeks because my network connection dropped while the database was being developed (I'm now developing on my C: drive and just making my own backups). I have been able to restore after each crash from backup tapes but now am having another problem that may or maynot be related to a corrupt database?

Sometimes (about 1 in 20), when a form opens another form I get a Error 2001 - You canceled the previous operation.

I've tried upgrading to Access XP. I've looked-up this topic here on Tek-Tips and in Access Help and MS Web pages. I've repaired the database and also made a new .mdb and imported everything. No help. (What is 2001 really!)

All I've found is that other people have had this problem. Not many, but some going back for years. It might be related to a corrupt database or in one case I was told it was 'all about String comparison'.

I'm at a lost as to how to proceed. I try to program around this error code, but that become impossible if the database is really corrupt and the problem spreads.
 
Yes but did the code cancel some event?? Your description of the problem didn't say whether you might not have a code issue. How about creating a new database and importing all the database objects from the previous database. This would tend to confirm whether the database or the forms were corrupted. Almost always a corrupted form can be corrected by creating a new copy.

Steve King Growth follows a healthy professional curiosity
 
I've had the same problem for no logical reason in the code. In the most recent case it was when working with Oracle tables through an ODBC connection. The MS KB offered the very helpful "It's likely due to corruption of the form--import objects into new database" solution. I've never tried the new copy of the form that Steve mentions--it's certainly easier to do than import all objects into new db (check all references and StartUp property if you do import).
 
I have ran into this in the last day but mine was easy to find and yes it was in my code. But it might help to look in a different direction. I had a piece of code that changes the Child and Master field links. I had to put in the

On Error Resume Next

to remove the 2001 error. The reason I got the error is because access holds the links as an active operation when the form is open, when you change the links you change the operation therefore the previpous operation is canceled.

HTH Dave
ToeShot@Hotmail.com
Today Is Tomorrows Yesterday. So Why Wait
 
Thanks for all the comments!!!

I think I have tracked down what might be causing it in my case.

As I mentioned, my database had a 'heavy crash' a few days ago and I had to restore it from tape. Each form in the system though, assigns the background upon opening (sets Me.Picture = ...\greenfade.gif). Upon testing everything I could think of I found that when I change the default background to a different .gif file the errors stop. When I change it back to greenfade.gif they all come back again.

Without understanding all the detail, I guess the .gif file somehow got corrupted when my database crashed. And since the .gif file isn't stored as part of the database, it's being corrupted wasn't fixed by restoring the database.

I sure hope it stays fixed! I feel like I'm wasting enough time redoing the work I lost without spinning my wheels on this Error 2001 thing. [shadeshappy]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top