Forms won't launch

staceyd

New member
Local time
Today, 10:01
Joined
Jul 2, 2002
Messages
8
About once a week I run a compact and repair to my database and save a copy for a backup. After the last compact and repair the database has not been able to open any forms. The tables, queries and reports all seem to be running as usual. The problem is with the forms.

When I try to open a form in my database I get a Microsoft Visual Basic error that reads "Module not found" Then a visual basic window opens and nothing else happens. When I try to close this window it tells me that "this command will stop the debugger." However, I have let the debugger sit and nothing seems to happen. If I cancel out of the debugger, I can usually see the form. If I try to go straight to design view, I can see the structure of the form.

Now this is true for all but two forms, and these are the Main Form and the Subform in the Main Form. The Main Form is set up to open when the database opens. When I try to open either the Main Form or the Subform, nothing happens at all (that I can see).

Now I know little to nothing about Visual Basic and I am running Access 2000. Does anyone have any suggestions?
 
It seems your database is slightly corrupted; use the backup file.

Access can't find the module of the form. If you didn't put any code behind the form you can set the Had Module property of the form to False. Watch out; A button made with a wizard makes code to!!!
 
Have you tried importing all of the db objects into a new database?
 
Thanks for the replies. I suspected that the problem was some form of corruption. But I was not sure if there was some programming that might help find a problem and fix it. It is good to know that I was able to (hopefully) fix the problem without it.

Here is what I did:
I deleted the data from the tables in an older version of the database. Since all the relationships, forms, queries and reports took quite a bit of time to rebuild, I wanted to preserve the structure. I also wanted to preserve the week worth of data entry since the last backup.

Then, since I could access the tables on the corrupted database, I imported the data tables into an older version of my database. Then a simple append query allowed me to create an updated database sans corruption.

Is the corruption that occurred just some quirky problem with Access or is there something I can do to prevent it in the future?
 
You might have the same problem if you do not know exactly what was corrupt in your db. Importing all of the database objects into a 'new' db should find the offending (corrupted) object [table, form, a record, etc.]. I have seen db's that had a slight corruption that enabled the db to function until one day...boom! The db finally crashed. Users would then dig out a backup that might be a week or two old and start over with the old backup. The backup crashed again in another week because it too was "slightly" corrupted and they did not bother to find and fix the problem.

Running the Repair & Compact functions helps to keep the db in running order and also alert you if there is a problem.

HTH
 
Make sure under Properties for each form, if applicable, that Has Module is Yes. There has been a recent posting where this was reversed to No and alothough all of the modules were there the forms weren't looking for them.
 

Users who are viewing this thread

Back
Top Bottom