'Modul not found'-error shutting down db.

Ssstacey

Registered User.
Local time
Today, 21:23
Joined
Aug 9, 2005
Messages
48
Hi,
I keep getting a "Module not found"-error when I click anything on my Main form. It used to work just fine until I deleted a couple of other forms that I wasn't using anymore. Apparently, in VBA it still exists (How is this possible??!!) and VBA keep referring repeatedly to this particular form telling that it is either misspelled or doesn't exist and then closes my db. . I tried deleting the form in VBA, but no luck so far.. Any help???
Thanx..
Stacey
 
Does it compile?

Can you isolate the offending line by setting a break point and stepping through the code?
 
No, it does not compile. I get the message about the form being misspelled or not existing. After a few "OK"-clicks, i get the message Module not found.

I wouldn't know where to put a break point. It does it with everything I click that has a VBA-stuff behind it. I tried finding where in the whole project I referred to this form I deleted, but nothing. As far as I know, it's not mentioned anywhere.
 
Sometimes if you have say, a command button with code behind it, and you delete the button, the code sub-procedure for the button is still there and this could be your problem. The only way I know to find and delete these pieces of code is to open the form code module and step through each sub-procedure section and make sure it is a valid pc code...

Hope this makes sense...
 
I went through all the sub procedures as you said and checked for valid pc code, but still nothing. The thing is, I can still see the form that is giving me this problem among the Access Class Objects in the VBA view. There is no code in it, but I cant delete it either. When I click on it, I get the misspelled etc etc message. is there a way i can just delete it or wont that solve my problem?
Maybe I should mention that right before this occured, I was copying some command button and afterwards deleted them. Maybe this sheds light on the cause of the problem?
Thanx..
Stacey
 
Hum... Can you create a new .mdb and import all the objects over into it?
 
Sounds kinda drastic... Shouldn't I leave that as last resort? What will happen if I compact and repair it?
 
I would have thought you may have already tried a compact/repair after it failed to compile...

Drastic? You may fiddle around forever trying to find a problem like that when a two minute new/import drill may fix it... :)
 
Sorry... I just tried the compact and repair... Still nothing..
It does sound drastic to me.. I have to create another mdb.. But that would imply that I have to create all tables and queries again, right? or not? Could u indicate the right steps to do this correctly?
Thanx..
 
You should be able to do a File->Get external data->Import...and bring it all over in one swoop...
 
You are right... wasnt drastic at all.. Its working okay again.. Thank you..
Stacey
 

Users who are viewing this thread

Back
Top Bottom