Converting from Access 2000 to Access 2002

G

Gordon Padwick

I created an Access database in Access 2000 running under Windows 2000. My
client has upgraded to Access 2002. I ran the conversion utility to convert
the Access 2000 database to Access 2002. When attempting to run the
converted database, it initially opens but, when I try to use it, I get the
message "Microsoft Access has encountered a problem..."

I've tried breaking the original database into separate components. I can
convert tables, queries, macros, and modules successfully. It's when I try
to convert forms that problems occur. Some of my forms inititally appear to
convert okay, but when I look at them, none of the underlying VBA code is
there. Other forms won't convert at all.

I came across an earlier message about conversion from Doug Steele
(Microsoft Access MVP). He says there's no need to convert files because
Access 2003 (presumably Access 2002, too) uses the Access 2000 format by
default. However, when I try to open the original Access 2000 files under
Access 2002, I still get the "Microsoft Access has encountered a problem..."
error message.

I'll appreciate any suggestions for solving this problem. I don't want to
tell my client to choose between running the database under Access 2000 or
hiring me, or someone else, to recreate the database for Access 2002.

Gordon Padwick
 
A

Allen Browne

Gordon, there's a good chance that this is the kind of corruption that a
decompile would fix.

Try this sequence:
1. Open your database in Access 2000, and 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, and make sure you
refere to the Access 2000 exe:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Open Access 2000, and compact again. Close without doing anything else.

5. Open Access 2002, and create a new (blank) mdb.
Immediately uncheck the Name AutoCorrect boxes.
(If you want A2002 file format, set this first under Tools | Options |
Advanced.)

6. Try importing the objects from the A2000 mdb:
File | Get External Import

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

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

(Ultimately, if you are able to import only some forms, you may be able to
import the bad ones from another backup.)
 
N

Nick X

Thank you,
I did this with my database, which my case sounded very similar to this one,
and now my database is running, jumping and playing like a puppy. No more
sending an error report to Microsoft everytime I try to switch from design to
form view!!!
NickX
 
G

Gordon Padwick

Thanks for the detailed suggestions, Allen.

I followed steps 1 - 5 without any problem. At step 6, I was able to import
tables, queries, reports, a macro, and modules without any apparent problem.
However, there's a major problem with forms (I have many). The import
process seemed to work for the first few forms, but then the process stopped
with the message "Microsoft Access has encountered a problem..."

I opened the new database and opened in design view a few of the forms that
had been imported. In each case, the form had been imported without any of
the underlying VBA code.

Any suggestions about where we go from here?

Gordon
 
A

Allen Browne

If you can still open these forms in design view and view their code window,
you can copy the text from the code window, and save it as a text file
(typically using the same name as the form with a .txt extension.) You can
then close this database, and open the new one that lacks the code. Open
each form's blank module, and paste the code in.

There is an undocumented way to save the entire form as a text file, e.g.:
SaveAsText acForm, "Form1", "C:\Form1.txt"
and then import it into your new database with:
LoadFromText acForm, "Form1", "C:\Form1.txt"
IME, this generally doesn't work for corrupted forms though.
 
G

Gordon Padwick

What a pain. I have about 50 forms to work with.
I wonder how Access 2002 got through the beta program with such a
significant bug. I say this as one who has participated in other Microsoft
beta programs.
Thanks for your help.
 

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