Solved

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

Posted on 2004-08-02
9
687 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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
 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
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 …

809 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