form crash -- urgent.. pls help... thanks

G

Guest

Using access 2000, multiple user, shared file, did not split databaseinto
(FE/BE).
*QUESTION*
I have a form in my database to search for specific data, out of sudden, one
of us could not open the form upon double clicking on it... the others
decided to close the access database and open up again, this is where we
actually found out that our form crash... ever since then we cant open the
form again...

hope sumone will advice on how to retrive the form or what to do to retify?

thanks a lot....
 
A

Allen Browne

There are various things that can be done to try to rescue this form.

Since the database is split, presumably everyone has their own copy of the
front end (as that is the point of splitting it.) Could the therefore
replace the bad front end mdb with one of the good ones?

If you cannot do that, try this sequence:

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact

3. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Open Access, and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

At this point, you should have a database where the name-autocorrect errors
are gone, the indexes are repaired, inconsistencies between the text- and
compiled-versions of the code are fixed, reference ambiguities are resolved,
and the code syntax is compilable.

If it is still a problem, the next step would be to get Access to rebuild
the database for you. Follow the steps for the first symptom in this
article:
Recovering from Corruption
at:
http://allenbrowne.com/ser-47.html

The undocumented SaveAsText and LoadFromText might also help.
 
G

Guest

hi allen,

i think u misunderstand my question, my database is NOT split, we shared the
whole database in a shared folder in our network.

my main concern is my form does not appear anymore when i double click on it
though it still shows in the list of forms... is a search engine for looking
up of specific data..

pls advice again... thanks a million...
 
A

Allen Browne

Oh, dear. I did not read your question well. Let's try again.

Firstly, make a backup copy of the mdb, while no-one is using it, and
without overwriting any existing backups. This lets you have multiple tries
at recovering the form.

Attempt 1
=======
Now open the database (with no one else using it).
Make sure the Name AutoCorrect boxes are unchecked under:
Tools | Options | General
Open the Immediate Window (Ctrl+G)
Try exporting the form like this:
SaveAsText acForm, "Form1", "c:\form1.txt"
replacing Form1 with the name of your form.
If that works, delete the form, compact the database, and try importing the
form again:
LoadFromText acForm, "Form1", "c:\form1.txt"

Attempt 2
=======
If that process won't work, are you able to open the form in design view? If
so, open the form's module, and copy it all out to notepad and save it as a
text file.
Then set the form's HasModule property to No, and accept the warning that
you will lose the code (which you just saved exteranlly.)
Compact the database.
Close Access.
Decompile the database by entering something like this at the command prompt
while Access is not running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"
Open Access
Compact again.
Are you able to open the form now?

If that still fails, but you have the code from attempt 2, you could delete
the form completely, recreate it (using the same names), and paste the code
in again.
 

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