Module not Found error

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

Guest

Hi,

I am getting this error sporadically on VBA code in a MS Access 2003
database. It gives absolutely no indication of what module is missing, so I
can't work out how to troubleshoot it. The help suggests it is not a problem
with references, and indeed they look OK.

It occurs when I try to compile any of the modules in the database.

Can anyone give me a clue on how to proceed?

Thanks
 
First, you will want to make a backup of the MDB so you get multiple chances
at recovering it.

Next, try a compact/repair. You may find that's enough to solve the problem,
or the attempt to repair the database may fail if things are not good.

If it fails, try a decompile:
1. Close Access.

2. Decompile the database by entering something like this at the command
prompt while Access is not running. It is all one line, and include the
quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

3. Compact:
Tools | Database Utilities | Compact/Repair

If it still fails, the next step will be to try getting Access to rebuild
the database for you:
1. Create a new (blank) database.

2. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

3. Import the tables and queries from the old database:
File | Get External | Import

4. Then try importing the forms, reports, macros, pages, and lastly the
modules.

As you watch the import process, you may see it fail on a particular form.
If so, run the import again but deselect this form. You may have to build
this one again from scratch, but you will have the rest of the db in a
working state.
 
First, you will want to make a backup of the MDB so you get multiple chances
at recovering it.

Next, try a compact/repair. You may find that's enough to solve the problem,
or the attempt to repair the database may fail if things are not good.

If it fails, try a decompile:
1. Close Access.

2. Decompile the database by entering something like this at the command
prompt while Access is not running. It is all one line, and include the
quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

3. Compact:
Tools | Database Utilities | Compact/Repair

If it still fails, the next step will be to try getting Access to rebuild
the database for you:
1. Create a new (blank) database.

2. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

3. Import the tables and queries from the old database:
File | Get External | Import

4. Then try importing the forms, reports, macros, pages, and lastly the
modules.

As you watch the import process, you may see it fail on a particular form.
If so, run the import again but deselect this form. You may have to build
this one again from scratch, but you will have the rest of the db in a
working state.
 
Allen,

Thanks for your comprehensive reply. This morning it is all OK (as I said,
it is sporadic - this is running on a Citrix server farm and there may be
some security or installation problem - I should also check whether it is
specific to one server in the farm I guess).

However I will take note of your suggestions, and when it happens again, I
will give them a try.

Thanks
Les
 
Back
Top