Cannot view code in Access Module

wallaseawez

New member
Local time
Today, 22:22
Joined
Aug 17, 2009
Messages
7
I have just started a new access database, I had created a module with a substantial amount of code within it. The module appears to have renamed itself from mod_scheduler to simply ". If I try and open by double clicking I get an error messgae stating that the module name is misspelled or refers to a module which doesn't exist. If I try and view it through VBA I can see half of the border for the window but nothing else. If i try and copy and paste the module I get an error messgae stating that the name conflicts with an exisiting object whatever I try and name it. I have compacted and repaired with no joy and if I try and import the module into a different db I get the name conflicts error. The strange thing is the code in this module still runs, I have some code from a form command button which calls the sub and it is definately running. If I right click and select definition where this sub is being called then access just crashes. Any help to retrieve my code would be appreciated. Thanks
 
I have just started a new access database, I had created a module with a substantial amount of code within it. The module appears to have renamed itself from mod_scheduler to simply ". If I try and open by double clicking I get an error messgae stating that the module name is misspelled or refers to a module which doesn't exist. If I try and view it through VBA I can see half of the border for the window but nothing else. If i try and copy and paste the module I get an error messgae stating that the name conflicts with an exisiting object whatever I try and name it. I have compacted and repaired with no joy and if I try and import the module into a different db I get the name conflicts error. The strange thing is the code in this module still runs, I have some code from a form command button which calls the sub and it is definately running. If I right click and select definition where this sub is being called then access just crashes. Any help to retrieve my code would be appreciated. Thanks

I can't read the text... it's too small...
 
Why not just rename it?

Thanks for your sugestion Alisa, but when attempting to rename it just doesn't work! It allows me to edit the name, but then when I tab it just reverts back to " again
 
Sounds like to me that you have a corruption issue. Is the mdb split FE/BE?
What version of Access are ou running?
Do you have backups?

David
 
Hi David

No I do not have db split, it is a fairly new and in early development stage. I am building on home pc which is running 2007 but have emailed to work now where I am running 2002 and still having same problems.

I do have back ups but none after I had created this Module :mad:

I think the code is working as I want it to, just no way of checking now!
 
We always talk about splitting databases, and alot of developers, or would be developers, tend to fall into the same trap, develop the system in a single mdb, then split it afterwards. In most cases this is ok, but on occasion things go amiss and alot of development work can get lost though corruption. It has always been my best practice to split the database at conception and develop it accordingly. Some vba does not work on split databases that work fine on unsplit ones, names using the .seek function on recordsets. This means the eser has to revert to FindFirst.

There is a sample database documentor in tha sample databases that saves your objects to text files (including modules) download that and give it a try. However I have not tested it on 2007.

If it does transpire that you cannot reteive your module, all I can say is that it is a good lesson learnt, sadly too late.

David
 
Cheers David, documenter doesn't work either though as Access can't find the procedure.

As you stated a lesson learnt and a day of remembering and rewriting code ahead for me to look forward to!
 
what happens if you set a watch to break when some value is true in a procedure that is in that module? Will it open on the break?
 
David, I tried the documenter you suggested and it produces runtime error 3021 (No current record) when it gets to my 'half missing' Module.

Alisa, I have tried breakpoints and stepping into and each time this just causes Access to crash.

Thanks for your suggestions guys but I think I need to face the fact it is well and truely screwed!
 
sorry to hear that, good luck remembering what you wrote.
 
Well we tried, didn't we. Anyway at least you said "half" and not ALL.

David
 

Users who are viewing this thread

Back
Top Bottom