Solved

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

Posted on 2004-08-02
9
688 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Find unused columns in a table 12 75
auto-fill field(s) in Access data entry form 17 45
Access Report formatting issue 5 24
unknown computers in my LAN 12 35
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

730 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