Discussion Locked

form errors converting Access 97 to 2000

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am trying to convert a task database from Access 97 into Access 2000.

I can bring in my tables, queries, reports, and macros, but when I try to import/convert the forms I get the following errors:

"An error occured while laoding "Form [fill in the blank". Do you want to continue loading the project?

I get this question several times.

I also get the notice that says:

"The Visual Basic for Aplications project in the database is corrupt."

Any ideas on how to resolve this, without having to recreate the forms in A2K?

5 replies

by it_cowboy

If you have created an Access 2000 db and are importing the forms from the Access 97 db, this probably not the correct way. Open the Acc97 db in Acc2000 and follow the prompt to convert.

Otherwise, check out to make sure that the References for your code modules are correct.

Acc2000 by default uses ActiveX library instead of the Microsoft DAO 3.6 library. You may need to set it up...

Open a Module, click on Tools, References and select Microsoft DAO 3.6 Object library.

Then try and import your forms again.

by conntrol

I did open it first in a2k and tried to follow the prompts and it bombed - miserablly.

so far the most success I've had has been to import objects piece by piece.

by jericho johnson

The message "The Visual Basic for Applications project in the database is corrupt" is most likely referring to the new 2000 .mdb, not the 97 .mdb. This is because Access 2000 changed the way it stores all code in the database. All code is now stored as a single VBA project instead of the code being stored with the individual forms, reports and modules.

Try checking the references in the 97 database. Also, try decompiling the 97 database and then try to import it. ex:

"C:\Program Files\...\msaccess.exe" /decompile "your-mdb-here"

This causes Access to sometimes fix some problems with the forms and code in a database that compact and repair can't fix.

Also, as mentioned in the previous answer, if you created a new empty Access2000 mdb file and tried importing, Access 2000 defaults to ADO, not DAO, so your references will need to be altered to remove the ADO reference and include the DAO 3.6 reference.

Hope this helps.

by conntrol

NEED FOLLOW UP:
I'm running W2K, when I tried to decompile the db, I got an error saying this wasn't a supported external command.

As for the DAO/ADO - how do I check those references, and where do I change them?

is there something I could set in A2K first, then try another import?

by nicholasp

Try to convert the database on a machine that has only office 2000. I have had a lot of problems with VBA when I have both versions of office installed.

This discussion is closed to new replies.