Dealing with Error Converting a Database with a Large Number of Forms That Have Modules

While working with MS Access, you never know what problem will come in your way to performing any task. Error messages appear on your computer screen without giving any clue and make you spend hours and hours on finding out the solution. Below mentioned is one of such errors that frustrate you badly:

The Visual Basic for Applications project in the database is corrupt.

This error occurs when you convert any MS Access 97 database to MS Access 2000 format and the database contains several hundred forms. If even after occurrence of this error, database gets successfully converted, no module will be displayed in the project.

How to confirm the cause of the issue?

To make sure that the error is occurred because the database contains several hundred forms, follow these steps:

    1. Create a new blank database in Access 97 and name it ManyForms.mdb.
    2. In the new database, click Modules under Objects, and then click New.
    3. Type the code to create 900 forms, each with the HasModule property set to Yes
    4. On the View menu, click Debug Window
    5. In the Debug window, type the following line, and then press ENTER: CreateManyForms
    6. Close the module and don’t save the changes
    7. Close the database and quit Access 97
    8. Open Access 2000
    9. On the File menu, click Open.
    10. Locate the ManyForms.mdb and open it
    11. When prompted, click Convert Database, and then click OK
    12. During conversion, you receive the following message

The Visual Basic for Applications project in the database is corrupt

  1. Click OK
  2. If the conversion process creates the new database, open any form in Design view.
  3. On the View menu, click Code. If you see that no module is opening, then it is for sure that the error is caused due to hundreds of forms in database.

Resolving the issue:

Now that the cause of the issue is confirmed, you can move further to resolve it. To resolve this issue:

  1. Open your original database in Access 97 and delete any forms that you do not need.
  2. Move some of the forms to another Access database before you convert the database.
  3. Continue deleting or moving forms out of the database until you no longer receive the error.
  4. If there is any form with a blank or unused module, set the HasModule property of the form to No.

Now convert the database. You will face no error and also be able to see modules in converted database.

Free download demo version of kernel for access recovery software.