Microsoft KB Archive/294755

= You receive a corrupted VBA project error when you try to convert a database in Access 2002 =

Article ID: 294755

Article Last Modified on 8/12/2004

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q294755



Novice: Requires knowledge of the user interface on single-user computers.

This article applies only to a Microsoft Access database (.mdb).

For a Microsoft Access 2000 version of this article, see 225946.



SYMPTOMS
When you try to convert an Access 97 database to Access 2002, you may receive the following error message

An error occurred while loading Form_FormName. Do you want to continue.

followed by a second message:

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



CAUSE
You receive these error messages when the database that you are trying to convert is not in a compiled state, or if there was corruption in the database before you tried to convert it to Microsoft Access 2002.



RESOLUTION
To work around this behavior, use one of the following methods.

Method 1: Compact in Access 97

 * 1) Open the database that is in the earlier version of Access.
 * 2) Open any module in Design view.
 * 3) On the Debug menu, click Compile and Save All Modules.
 * 4) Close the database.
 * 5) On the Tools menu, point to Database Utilities, and then click Compact Database.
 * 6) Convert the database again in Access 2002.

NOTE: If you want to use this method, but you have already removed Access 97 from you computer, you have two options:
 * Move the database to a computer that still has Access 97 installed and follow the steps listed in Method 1.

-or-


 * Reinstall Access 97 on your computer.

If you reinstall Access 97, make sure you install Access 97 in a folder different from the folder where you have Office XP installed. This may require you to change the default installation location during Setup of Access 97.

Method 2: Import the Objects Directly

 * 1) Start Microsoft Access 2002.
 * 2) Create a new, blank database.
 * 3) On the File menu, point to Get External Data, and then click Import.
 * 4) Select the database that you want to convert to Access 2002, and then click Import.
 * 5) Select all the objects on each tab of the Import dialog box.
 * 6) Click Options.
 * 7) Select the options to import Relationships, Menus and Toolbars, and Import/Export Specs.
 * 8) Click OK to perform the import.

Note that you must add any references that your VBA project requires by clicking References on the Tools menu in the Visual Basic Editor.

Method 3: Remove References to Utility.mda

 * 1) Open the database that is in the earlier version of Access.
 * 2) Open any module in Design view.
 * 3) On the Tools menu, click References.
 * 4) Click to clear the Utility check box, and then click OK.
 * 5) On the Debug menu, click Compile All Modules.
 * 6) Close the database.
 * 7) Convert the database again in Access 2002.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

