How to find a hidden module...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I'm trying to make an MDE file; I'm getting an error message saying it can't
compile because of a hidden module. I don't remember hiding anything (don't
know how to either). How do I find it? It gives me the name of the form, but
that form doesn't show up in my database window.

Thanks in advance,

Frodo.
 
Hello,

I'm trying to make an MDE file; I'm getting an error message saying it can't
compile because of a hidden module. I don't remember hiding anything (don't
know how to either). How do I find it? It gives me the name of the form, but
that form doesn't show up in my database window.

Thanks in advance,

Frodo.

Tools + Options + View
Place a check the Show Hidden Objects check box.
 
I'm trying to make an MDE file; I'm getting an error message saying it can't
compile because of a hidden module. I don't remember hiding anything (don't
know how to either). How do I find it? It gives me the name of the form, but
that form doesn't show up in my database window.

Hi Frodo,

I've seen this before and 99% of the time there is some kind of VBA
corruption. Simply compacting does not always fix the issue because
the compiled version of the code can sometimes differ from the text
version you see. This can prevent the creation of an MDE file.

At this point I think a decompile is in order.

Here is an explanation of what it does by MVP Allen Browne:The Decompile switch was undocumented in earlier versions of Access, but has
been documented for 3 versions now.

Decompiling may not give the same results as importing into a new database.

In an mdb file, there are 2 copies of the code:
- a text version (what you view and edit);
- a compiled version (what actually runs).

If the database corrupts, these 2 may differ.
Decompiling discards the compiled version.
It then recreates the compiled code from the text version.
The inconsistency is then gone.

If you import from one mdb into a new file, using the same version, Access
may import both the text version and the compiled version exactly as they
were. If the two copies were inconsistent, the new version can therefore
still have the inconsistency. This is not common, but it does happen.

So, the safest procedure would be:
1. Decompile the old mdb.
2. Compact it to get rid of the space used by temp objects and the compiled
code.
3. Import into a new (blank) database. At this point you are importing only
the text version as the compiled version has been discarded.
4. Set your minimal references, and compile.
So to elaborate a little further here is what I would do.

1. Make a backup of your database.

2. Repeat step 1

3. Compact the database:
Tools | Database Utilities | Compact

4. Close Access. Open a command prompt, and enter something like this. It is one line, and include
the quotes:
"C:\Program Files\Microsoft Office\Office\Msaccess.exe" /decompile "C:\My
Documents\MyDatabase.mdb"

Adjust the syntax for your Access.exe file and file location.

5. Compact the database again to clear it out:
Tools | Database Utilities | Compact

6. Create a new blank database and import everything (including data, menubars, toolbars,
relationships, etc.)

7. Set minimal References needed

8. Turn off Name AutoCorrect

9. Compile your new database

10. Compact the new database
Tools | Database Utilities | Compact

11. Set any Startup properties
Tools | Startup

12. Close the database (and Access) and then reopen
Try making an MDE file now.
Success??
 
Hey Jeff,

Thanks for your reply...and thanks for your detailed steps...brilliant for a
rookie such as myself.
Quick question: what do you mean by "Set minimal references?"

Thanks,

Frodo.
 
Hi Frodo,

Minimal references mean only setting the basic references
that Access needs to run. You get to that area by going
to any code window and selecting Tools | References.

Here they are from a past post by MVP Tony Toews:The Access 97 default references are:
Visual Basic for Applications
Microsoft Access 8.0 Object Library
Microsoft DAO 3.5x Object Library

The Access 2000 default references are:
Visual Basic for Applications
Microsoft Access 9.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library
or
Microsoft DAO 3.6 Object Library

The Access 2002 default references when the MDB is created in Access
2000 format are:
Visual Basic for Applications
Microsoft Access 10.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library

The Access 2002 default references when the MDB is created in Access
2002 format are:
Visual Basic for Applications
Microsoft Access 10.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.5 Library.
OLE Automation is not *always* required for every application.

Hope that helps,
 
Hey Jeff!

Thanks so much for your help...I was able to create the MDE after following
the steps.
I encountered the error described at :
http://support.microsoft.com/?kbid=277925.
I was able to export the data and then recompile.

Excellent news Frodo!
I was pretty confident you had some corruption.
Now that you have a good working database,
make a few extra backups, OK?
Thanks for all your help!

You're welcome, glad to help.
 
Back
Top