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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form That Stops Working

Status
Not open for further replies.

safedir

Technical User
Sep 13, 2002
7
0
0
US
I have a form in a small database that I set up for another person in my workgroup that stops working. It is still in the list of forms, but will not open in either design or form view. The query still works. There is no error message, just a pause then a return to the same state as before I clicked open or design. This has happened twice with the same form. The first time I had the database restored from the backup tapes. The form then worked for several days. Now it has stopped working again. The form has a lot of controls, but no code.
I have tried compacting and repairing. It makes no difference. Has anyone had similiar problems? Does anyone know what I can do to keep this form working?
 
I've had this happen. Very annoying. One thing you can try to "restore" a corrupted form is to use the SaveAsText and LoadFromText functions...

1. Open the database in question. Do not attempt to open the "bad" form.

2. Open the code window. In the Immediate window, type, e.g.:

SaveAsText acForm, "frmYourForm", "C:\frmYourForm.txt"

3. Rename the bad form, to something like "frmYourForm BAD"

4. Go back to the Immediate window and type:

LoadFromText acForm, "frmYourForm", "C:\frmYourForm.txt"

5. If the new version of frmYourForm is working, delete the renamed version (the corrupted one).

Good luck.
 
Thank you for your reply. Unfortunately I have already deleted the corrupted form and can't try it out. I was more interested in what corrupted the form than in a way to save it. The second time it happened I had a copy of the database that I could use. So I deleted the corrupt form and imported a copy from the database copy. Do you have any idea what caused the problem?
 
Thank you for your reply. Unfortunately, I have already deleted the corrupted form and can't try it out. I was more interested in what corrupted the form than in a way to save it. The second time it happened I had a copy of the database that I could use. So I deleted the corrupt form and imported a copy from the database copy. Do you have any idea what caused the problem?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top