Module not found error

G

Guest

I made some layout changes to my switchboard form in the design master and
now all controls on all my forms generate anerror message.."Module not
found". The Visual Basic window appears and highlights the very first line of
the sub routine. What have I done and can I repair this design master? I
attempted to syncronize with another replica in the set and now it has the
same errors.
 
G

Guest

A post given by Allen Browne on a related subject, please try it

Do you get this error even if you open the form in *design* view?
If so, it sounds like a corruption, and these steps might help:

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

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact

3. Close Access. Make a backup copy of the file. 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"

4. Open Access, and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

At this point, you should have a database where the name-autocorrect errors
are gone, the indexes are repaired, inconsistencies between the text- and
compiled-versions of the code are fixed, and reference ambiguities are
resolved.

If it is still a problem, the next step would be to get Access to rebuild
the database for you. Follow the steps for the first symptom in this
article:
Recovering from Corruption
at:
http://allenbrowne.com/ser-47.html
 
G

Guest

Thanks for the quick response. On a quick look, I do not have the auto-name
feature enabled. The command buttons (all created with wizards and have been
working for quite some time) in all of the forms give the same Module not
found error.
 
G

Guest

Yes I did several compact and repairs. I tried syncronizing with a recent
replica that was working fine, but after the replication, it too has lost all
command functions.
 
G

Guest

Hi Denlow,

I have occasionally experienced the problem of command buttons not working
when I use Access 2002 to work on a database, and then send the database to a
user who has Access 2000 (or even open the .mdb file on my PC with Access
2000). Sometimes the command buttons are just DOA.

The fix has always been to create a brand new database in Access 2000,
immediately disable the NameAutocorrupt feature (see:
http://allenbrowne.com/bug-03.html for reasons why you want to do this). Then
import all objects from the suspect database into the new database, one group
at a time, into your new database. In other words, import all tables (but not
linked tables), then import all queries, then all forms, etc. While Access
will allow you to import all objects in one operation, the experts at FMS,
Inc. (a Microsoft Partner), have stated that it is best to import objects one
group at a time. Recreate any linked tables from scratch. When importing
local tables, make sure to check the option to import relationships, menus
and toolsbars, and import/export specs. If any of the local tables in the
source DB are hidden, you'll need to first unhide them.

You will need to set the checked references to match the source database,
along with any startup options set under Tools > Startup. Going through this
process often times solves corruption problems, because you get a new set of
the hidden system tables (the tables whose names start with "MSYS"). These
system tables are updated appropriately as you import objects.

This may sound like a lot of work, but it really isn't. Creating a new
container DB, disabling NameAutocorrect, importing all objects one group at a
time, and setting startup options and references to match the source DB is
usually a fairly quick procedure. When you are in the Visual Basic Editor, in
order to check that the references match the source DB, you should do a Debug
Compile ProjectName as well. You want to re-create any linked tables from
scratch, because Access can cache a lot of information about the links. Some
of this infomation may no longer be valid, so it's always best to recreate
the linked tables from scratch.

Good Luck,
Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

Thanks for the quick response. On a quick look, I do not have the auto-name
feature enabled. The command buttons (all created with wizards and have been
working for quite some time) in all of the forms give the same Module not
found error.

__________________________________________

:

A post given by Allen Browne on a related subject, please try it

Do you get this error even if you open the form in *design* view?
If so, it sounds like a corruption, and these steps might help:

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

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact

3. Close Access. Make a backup copy of the file. 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"

4. Open Access, and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

At this point, you should have a database where the name-autocorrect errors
are gone, the indexes are repaired, inconsistencies between the text- and
compiled-versions of the code are fixed, and reference ambiguities are
resolved.

If it is still a problem, the next step would be to get Access to rebuild
the database for you. Follow the steps for the first symptom in this
article:
Recovering from Corruption
at:
http://allenbrowne.com/ser-47.html

--
I hope that helped
Good luck
__________________________________________

:

I made some layout changes to my switchboard form in the design master and
now all controls on all my forms generate anerror message.."Module not
found". The Visual Basic window appears and highlights the very first line of
the sub routine. What have I done and can I repair this design master? I
attempted to syncronize with another replica in the set and now it has the
same errors.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top