Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fix Damaged/Missing Form

Status
Not open for further replies.

FXP

Programmer
Sep 17, 2004
135
US
I have an Access 2000 database with what appears is a missing or damaged form. The form does not display in the object Form list so I can't delete it. It has the name Form_Form1 in the Editor, but does not display any properties.

The error message when I select it is:

The form name "form1" is misspelled or refers to a form that doesn't exist.

I can export the code, but the code won't display in the Editor.

My problem is how do I delete the form?


Thanks.

 
Create anew empty database.
Import everything from the current db except the problem form into the new one.
 
Hi,

lupins46 gives you good advice.

After you import everything into the new db, I would recommend opening a code window and compiling the db.

Also, if you have an older, backup copy of the database with a good copy of the form that went bad, then after you do what lupins46, recommends, you could import the final form from this older backup. It may not have your latest changes, gut it is a starting point.

Hope This Helps,
Hap...

Access Developer [pc] Access based Add-on Solutions
Access Consultants forum
 
Thanks for the suggestions, but I seem to have a more devious problem. I used your suggestions, the damaged Form now is not showing up, yet I am still having a problem. When I try to open a Form, I get:

The expression On Open as the event property setting produced the following error: Error accessign file. Network connection may have been lost.

Also, I am now getting when I try to open a query:

Undefined function 'choose' in expression

This error refers to the built-in function which is still their when I use the Query Build box.


The above errors points to something else and the damaged Form was just a symptom of the problem. I should mention this db has been up and running for about a year with no problems.

Can anyone tell me if they have had these errors and what they were able to find out about them as a possible fix for me.

Thanks, again.







 
Hi,

Both the problems that you describe come from 2 problems
1) When you created a new blank db, the references were not the same
2) You did not get a good, clean compile after you compiled

So, Start over
1) Open up a form or module in your original (bad) db
2) Now Open the code window for this object
3) Go to tools>resources and note the resources checked off and the order
4) Now, exit the bad DB, and create the new blank db
5) Open a blank form and go to the code window in the new blank db
6) Go to tools>resources and set the References/resources to match what was in your bad db
7) Now, import everything into new db
8) Open up a form or module in your new db
9) Now Open the code window for this object in the new db
10) Final step, Compile the code and all should be good

Hope This Helps,
Hap...


Access Developer [pc] Access based Add-on Solutions
Access Consultants forum
 
Thanks for everyone's help. Sometimes the best thing to do is cut your losses. I restored the backup and was able to import and recode the missing updates. This was the path of least resistance.

Thanks all.
 
Glad to hear that you found a solution

Even more happy to know that you had a backup.

Most folks do not know how important a backup can be until they need it and do not have one.

Bottom line, backup, backup, backup......
You can never do to many backups

Hap...

Access Developer [pc] Access based Add-on Solutions
Access Consultants forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top