If you have a recent backup of the database that contains this form, it
might be easiest to delete the form, compact the database, and then import
it from your backup through File | Get External | Import.
Before you do anything else, it would be a good idea to uncheck the Name
AutoCorrect boxes under Tools | Options | General. There are many, many
naming problems associated with this misfeature. Here's a brief old list
which I am not bothering to keep up to date with all the current associated
problems:
http://allenbrowne.com/bug-03.html
Access 2000 and later keeps 2 copies of the list of forms in your
application. One is stored in the MSysObjects table, and exposed through the
Documents collection (DAO.) The other is exposed as CurrentProject.AllForms,
and this is the one that shows in the Database window. It is possible for
these 2 lists to get out of sync, so that the Database window and the
AllForms collection lists an object which has a different name in the
MSysObjects table. I have seen this happen by duplicating it (copying and
pasting) in the Database window. To test for this you could create a new
query, switch to SQL View, and paste:
SELECT [Name] FROM MsysObjects
WHERE (([Type] = -32768) AND ([Name] Not Like '~*'))
ORDER BY MsysObjects.Name;
If a different name shows there than appears in the Database window, this is
the issue.
There are other forms of corruption that can occur after a crash as well.
The first symptom in this article walks through how to create a new database
that will not contain the bad form, if you cannot merely delete it from the
Database window:
http://allenbrowne.com/ser-47.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
AlanC said:
I was designing a form (which included a sub form) when Access 2000 had to
close due to an error. After restarting found the database would re-open
but
the form I was editting would not open, on trying to opening the sub form
got a message saying object could not be found (although it appears in the
list of forms). I have tried repairing and compacting and also importing
the
objects into a new database. Does anyone have any suggestions as to how to
recover from this or will I have to recreate the forms from scratch?
Any help gratefully received.