Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Message "Module Not Found" in Access 2000

Status
Not open for further replies.

DK77

Programmer
Jun 4, 2002
15
US
We recently converted from Windows 98/Office 97 to Windows 2000/Office 2000 at work. I converted a number of databases to Access 2000. In the process, I had to set references to DAO 3.6 (I haven't gotten a handle on ADO yet, so I haven't tackled re-writing all my VBA code).

Anyway, this is the second time that I have done "something" which makes a database fail to open normally. I get a dialog box telling me "Module Not Found" when I try to open it. Last time it was that I had added a new module. I don't know which of a flurry corrective measures actually fixed this or it simply "fixed itself".

I now find myself in the same situation once again.

My choices are OK and Help. OK opens up the Visual Basic Editor and Help opens the not-very-helpful Help. Help suggests I need to do something to "add" the module to the "project". I don't understand this.

When I try Repair/Compact database, or try to edit some code and compile/save it, I keep getting a dialog box that tells me "You cancelled the previous action". I may click OK on this 6 or 7 times in a row before it goes away, but the very next thing I try to do will bring it right back. I have to close the application entirely.

Has anyone seen this and what did you do about it? I've been working with Access 97 for several years and have intermediate or better VBA programming abilities.

TIA,
Dennis
 
Try a decompile.

msaccess.exe /decompile c:\something\OrTheOther.mdb.

Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
have you checked the Tools|References after it errors and kicks into debug mode to see if and what it is listing as missing?

I know we ran into this going from office 97 to office 2000 where we had originally referenced the Word 8.0 object but it was running on newer clients with Word 9.0 object on it. Anyway, we just popped into references deselected the missing one and selected the right or more current one or whatever.

Yours might be totally different but I hope this helps.
 
Thanks all for offering information and advice. I tried thornmastr's /decompile but it didn't help in this instance.

By continued digging I found the problem to be with a report to which I had added a Report_Open event. This application displays a Switchboard form when it starts up. I stopped this by clicking Tools>Startup... and clearing the name of the switchboard form from the "Display Page/Form" box.

Then the application started up without displaying the "Module Not Found" dialog. I then tried viewing the VBA code for this form by selecting the form from the database window and clicking the class module icon in the toolbar.

I expected to see the code for the switchboard form but instead I saw the code module for the report instead. I created a blank database and imported this report to it for backup/storage and deleted it from the application.

I then restored the switchboard as the opening form in the application and it started up without a hitch.

I now plan to re-create the report from scratch, using the "storage" copy as a template. I'll let you know if this works.

Thanks again for the great support.
 
Follow-up message:

Removing the damaged report solved my problem. Now I just have to wonder what happened to damage it. All I did was add a Report_Open event (DoCmd.Maximize) and compiled the database.

I wonder if this is something that only happens with databases converted from Access 97? Does anyone have any thoughts about this?
 
I have seen more than one instance where a perfectly good query/form/report takes a header for no apparent reason.

Fixes don't work.

So you blow it away and build a new one. Sometimes identically and that one works.

If you work with access long enough the improbable becomes commonplace.

Rhonin
"a sharp mind is a sign of a well worn whetstone"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top