Solved

Can not open form: The Microsoft Jet Database Engine could not find the object....

Posted on 2004-08-02
9
685 Views
Last Modified: 2012-06-22
While attempting to close MS-Access 2K, I received the reminder that a form and module were not saved.
The usual message, "Save Changes to the Following Objects" was displayed.
I pressed the CANCEL button.

The form that was not saved was calling a function saved in the module.

Now, when I attempt to open the form in design view, nothing happens.
The form does not open and no error messages are displayed.

When I attempt to open the module, I recieve the message "You have canceled the previous operation"

Compact and repair does not help.  Copying all the objects to an empty database seems to correct the problem with the module, however, I still can not open the form.  I receive the message, the Microsoft Jet Database Engine could not find the object....

Is there any way I can retrieve the code from the form?
0
Comment
Question by:pcalabria
9 Comments
 
LVL 34

Expert Comment

by:flavo
ID: 11700785
see if this works (works if the form hasnt crashed at least)

Function getCode()

Dim frm As Form
Dim i As Long

Set frm = Form_frmMyForm  'change to From_whateverYourFromIsCalledHere


If frm.HasModule Then
       i = frm.Module.CountOfLines
       Debug.Print frm.Module.Lines(1, i)
End If

End Function

Dave
0
 
LVL 34

Expert Comment

by:flavo
ID: 11700789
Will write the code behinde the form in the debug window (to open this, press Crtl+g)
0
 

Author Comment

by:pcalabria
ID: 11700843
Dave,

No good.

I get the message "Module Not Found"

I tried your code on a working form, and the code does work, it just doesn't work with the damaged form.
I'd be happy to try any other ideas that you have.  


0
 
LVL 34

Expert Comment

by:flavo
ID: 11700864
Try copy and paste???

Im all out of ideas after that sorry..  If compact and importing doesnt work, im at a loss.

I thought you could save a from to file, but maybe that's only Excel.

Sometimes its just best to start over (unless you have a backup)

Dave
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

Author Comment

by:pcalabria
ID: 11701000
I'm not sure what you mean by try copy and paste.

The problem is that, while the form's name appear in the list of forms, when I select its name then press the design view button, absolutely nothing happens.  It is as if the form was not there.
0
 
LVL 34

Expert Comment

by:flavo
ID: 11701049
select it, press ctrl+c, then ctrl+v and a window should prompt you for a name.  call it tempForm for example and see
0
 
LVL 26

Expert Comment

by:dannywareham
ID: 11701622
If all else fails, back up your original and start again.

Sounds like the form is attempting to open and run your code.
So when you open the module, it interupts the running and displays your error "you cancelled previous operation"
I've not seen this problem on a conversion before, but have seen it on a currupt 97 db.
0
 
LVL 4

Accepted Solution

by:
szacks earned 500 total points
ID: 11702935
try opening Acces in decompile mode (That is go to Start->run type msaccess /decompile then open up your form and see if it works.

Supposedly this removes a lot of the garbage from the file and I've seen it fix numerous other weird problems.
0
 

Author Comment

by:pcalabria
ID: 11706577
Thank you szacks!!!

Openning Access in decompile mode exposed the code window for the form!!!!  This allowed me to copy the code and use it to recreate a new form!

While I did lose all the objects on the old form itself, replacing a 125 combo and text buttons was nothing compared to rewriting the code again.  Thank you Thank you.  Did I say I was very happy that I was able to save the code?  :-)  Thank you!

Flavo, thanks again for your help.  When I tried to copy and paste the form it did cause another name to show up in the form list, however, attempts to open the form gave me a Jet database error.

dannywareham, thanks for your help too.  The form did have embeded code that called a routine in the crashed module... Perhaps it was trying to verify that the module was present before the form openned.  Since the module had crashed, the form would not try to open.

Regardless of the reason why the form would not open, when I opened access in Decompile mode the form and module code windows automatically opened!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now