?
Solved

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

Posted on 2004-08-02
9
Medium Priority
?
692 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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 2000 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

765 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