cannot open form and subform - "you cancelled the previous operation"

ehdoh

Registered User.
Local time
Today, 07:34
Joined
Jun 24, 2003
Messages
58
I have a form with several subforms. The other day after adding some if-then code to automate the data entry a bit, I attempted to add a macro as well. After doing this, I received some strange messages about adding a module (which I was not trying to do but believe happened automatically through the macro). Then i received a message "you cancelled the previous operation" and since then have not been able to open my form or subform.

I have searched online for a solution to this, and it seems they are all geared towards changing the code in the form that is having the problem. However, I cannot even open my forms. Any ideas for me? Or shall I have to re-create the form and subform that I cannot open?

Any help will be appreciated,
eh
 
Some code is running when the form(s) are opening (obviously) that is preventing it from opening properly. Code that runs is usually in the Open, Load, Activate, GotFocus, and Current events. Remove the code piece by piece until you find what's responsible.
 
I have not been able to even open the form and subform that are having problems; rather, each time i try to open either of them, i receive the error message referred to in the title of this thread.

I did discover that if I open the VB window through a related subform, that I can exit out of that window until I arrive at other forms' and subforms' code windows. In this fashion, I entered into the problem form and subform code windows and deleted all their code that I had programmed (all of which was at the control level, btw, not the form level for the open, load, activate, gotfocus, and current events as you suggest). This still did not solve the problem of not being able to open the form and subform, and it resulted in a new error message, "module not found."

When I first experienced the problem with these forms, I was creating a macro and received an error message about a module (the latter which I did not attempt to create). All of my macros are deleted and I can see no modules in my db window. I cannot open the problem form and subform to even see if modules are allowable, or to change this property.

Any suggestions for further efforts to salvage this form and subform??

dcx693 said:
Some code is running when the form(s) are opening (obviously) that is preventing it from opening properly. Code that runs is usually in the Open, Load, Activate, GotFocus, and Current events. Remove the code piece by piece until you find what's responsible.
 
Open them in design view. If you want to be absolutely certain you delete the modules (always create a backup, just in case thought) go to the form in design view, go to the Property sheet, click on the Other tab, and set the Has Module property to No.
 
I should have specified earlier--I cannot open in design view or otherwise...thanks for the thought though...
 
This has happened to me on 3 occasions.
Only once was I able to get around it and that was because I could open the form in design view. The other 2 occasions I was like you, stuck.
The only option was to restore from a backup copy or recreate the form again which cost me a days work.
I always make backups of any apps before any updates.
If it is a new project then I make regular backups so I don't get caught out again.
Sorry I couldn't be any more help. :(
 
Ouch--that's what I was afraid of...thanks for letting me know...at least I can say I'm not the only one to have locked up The Great Access!
Cheers,
e.
 
I have had experience with this as well. If you are fortunate enough to have a back-up, you should be able to simply copy-paste the non-corrupt objects from the back-up over the corrupt objects in the regular database, that way you won't lose any data.
 
Fortunately i did save a back-up, albeit of an older version. What I have been able to do so far was delete the form that seemed to be corrupted and copy the old one in, in its place. I think it will work out just fine, with a minimal amount of re-programming. Now if I could only remember precisely what action got me into this predicament in the first place, I'd be more confident that I could avoid this problem in the future. If nothing else, this has been a lesson to back up back up back up as often as possible...
 
You might be able to get to design view in the Visual Basic Editor -> Main Menu -> View -> Project Explorer window. Expand the Microsoft Access Class Objects folder, find the form in question, right click, and you can View Code and View Object, among other things.

See if that'll get you in.

Comment out a bunch of code, run your form, and comment code back in chunk by chunk till you locate the offender.

Cheers
 
thank you for the suggestion, but i already re-created from an earlier version...all seems to be running fine now...i just need to figure out how to solve the next problem (see my other thread on filling in value of control), which I now see was how I originally locked up the form/subform...

cheers,
e.
 

Users who are viewing this thread

Back
Top Bottom