Disappearing Forms

G

Guest

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.
 
A

Allen Browne

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
 
G

Guest

Thanks Allen, I rather feared that there wouldn't be a wonder solution. I'll
need to weigh up whether to start over with the changes I had just completed
or attempt to recover, suspect I'll end up trying to get to the bottom of it
anyway.

Your help is most useful!

Alan

Allen Browne said:
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.
 
G

Guest

hi allen...

sorry... another question... i read thru the forum and tried to import my
form from my backup database... after doing that, it seems like is working
but once a while when i try to search for my data, it will probe me with this:

"run time error '2501' ;
the open form action was canceled" -- it allows me to end and debug.

if i chose to debug, it shows me my form in microsoft visual basic-
form_menu code, and the following was highlighted to me.

"DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria"

pls advice...

heartfelt thanks in advance...


Allen Browne said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top