views:

44

answers:

1

Yesterday when I was working on a module in Access 2003, when I closed it, Access crashed. I think what I had done was renamed the module. After reopening Access I saw the new renamed module, but got the ol' "The module name "..." is misspelled or refers to a module that doesn't exist" error. I am unable to open it in the Database Window, or rename it there. But when I have the Visual Basic editor up I can get access to the module, but it has the original name still. I was able to copy and paste the code out, and the code does actually work still. The problem is that I can't rename or open the module in the Database Window. And that makes me worry. What should I do? Open a fresh database and copy and paste all my forms and queries and code into it? Or is it fine? :S

This is just a backend I'm working on, not even connected to the real database yet. The reason I was renaming the module was because I had a procedure have the same name as the module.

+1  A: 

I suggest you open a new mdb and import everything. You might like to look at this first: http://www.granite.ab.ca/access/corruptmdbs.htm

Remou
Thanks for the link! I'll give it a thorough read. I realize I have a back up of this backend from the day before, and it's basically just missing two or three forms and this module. Is it safe to just import what I did that was new from my "corrupt" database into the back up?
Jeff
It should be. However, it is not a bad idea to create a new mdb from time to time if you are doing a fair bit of development work. It is also important to decompile regularly. I keep a script (http://wiki.lessthandot.com/index.php/Decompile) so I can drag and drop the mdb to be decompiled.
Remou
I do a decompile every few weeks or so. Decompile or how to reduce Microsoft Access MDB/MDE size and decrease start-up timeshttp://www.granite.ab.ca/access/decompile.htm
Tony Toews
I find that, when building a new application, decompiling every few hours does not hurt, but that would be when making extensive changes.
Remou
Thanks guys, this really helped me out
Jeff