VBA Project Cannot Be Read

mbreu996

Registered User.
Local time
Today, 15:37
Joined
Feb 19, 2010
Messages
49
I have read posts about similar issues and am still unsure what to do about my situation. I'm using Access 2007 with 2007 file format.

I was working on this database last night, everything seemed normal. The first time I opened it this morning - a message appeared
"Cannot load Form_T_TEMPlab_SUB" (something to this extent - I only saw the message on this first attempt to open the database and did not record exactly what it said).

The next message appears unless I hold down the shift key (as recommended in another post) or use task manager to force the program to end.

"The database cannot be opened because the VBA project contained in it cannot be read. The database can be opened only if the VBA project is first deleted. Deleting the VBA project removes all code from modules, forms and reports. You should back up your database before attempting to open the database and delete the VBA project."

I am guessing it is hung up on the code embedded in the form it said it couldn't load. I don't recall altering the code on this form last night.

*Unable to import objects from this database into a fresh new one - I get the same message

*Able to manipulate forms in design view if i use the "hold shift" method, but still unable to access the VBA editor through the events, and cannot get into the vba editor using the link to it on the ribbon

*Tried deleting the Form T_TEMPlab_SUB - cannot, get the same message

What can I do to fix this? I tried looking at the database as a text file but I can't recognize any of my VBA code amongst the madness of the special characters.

Could it be possible that I left behind some unfinished/tested code last night that is now causing this error? There is a ton of code within this - both in a module and spread across countless forms.

I think the best solution may be to go back to a restore point - as I had another person test it out on a different machine and they are having the same problem (which rules out any corrupted .dll, in addition to the fact that other databases work fine on the machine).

Is there anyway to avoid this from occurring in the future?
 
I was able to revert back to a copy from 7 am this morning and everything works fine. Not sure what could have caused this issue (I didn't even open the file between then and when I had my issue - maybe somebody messed with my file). I suppose sometimes things just get corrupted for no good reason.
 
I was able to revert back to a copy from 7 am this morning and everything works fine. Not sure what could have caused this issue (I didn't even open the file between then and when I had my issue - maybe somebody messed with my file). I suppose sometimes things just get corrupted for no good reason.

1. Is the database split?

2. Is the file on your computer and not on the network drive when you are working on it?

3. If the answer to #2 is no, then corruption can happen very easily with a minor network disruption, etc.
 
1. Database is not split. I created it with Access 2007, as 2007 file format, and haven't split it or used any server/client type set ups - just a standard stand alone database (excuse my sloppy terminology).

2. The file is saved on a network drive. It is not saved on the hard drive of the computer I am working on. The file has been in the same location on this network drive as I have been completing the creation of the database.

3. I bet it was network disruption. I am working on this remotely so sometimes I forget to log out and the network connection gets disrupted - I have seen this happen before and it simply tells me to close database and reopen, but in this case not so friendly.

That is great advice, close the database when not working on it!!! I suppose the interruptions could occur at any time but leaving the application open over night is pure stupidity, thanks for making me aware of this!!! I sure am glad the restore worked or there would have been casualties.
 

Users who are viewing this thread

Back
Top Bottom