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

Article translations Article translations
Article ID: 225949 - View products that this article applies to.
This article was previously published under Q225949
This article has been archived. It is offered "as is" and will no longer be updated.
Moderate: Requires basic macro, coding, and interoperability skills.

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

Expand all | Collapse all

On This Page

SYMPTOMS

If your Microsoft Access 97 database contains several hundred forms, you may experience the following corruption error when you convert the database to the Access 2000 format:
The Visual Basic for Applications project in the database is corrupt.
If the database is successfully converted, you cannot view any module in the project.

CAUSE

This problem can happen if your Access 97 database has several hundred forms and each form has a Visual Basic for Applications module.

RESOLUTION

Open your original database in Access 97 and delete any forms that you do not need. Also, you may want to move some of the forms to another Access database before you convert the database. Continue deleting or moving forms out of the database until you no longer receive the error.

Also check to see if any form has a blank or unused module. If so, set the HasModule property of the form to No.

STATUS

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

MORE INFORMATION

Steps to Reproduce Behavior

  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 following code in the new module. The code creates 900 forms, each with the HasModule property set to Yes.
    Sub CreateManyForms()
    
       Dim f As Form, i As Integer
       Application.Echo False
    
       For i = 1 To 900
          Set f = CreateForm()
          f.HasModule = True
          DoCmd.Close acForm, f.Name, acSaveYes
       Next
    
       Application.Echo True
    
    End Sub
    					
  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.
  13. Click OK.
  14. If the conversion process creates the new database, open any form in Design view.
  15. On the View menu, click Code. Note that no module opens.

Properties

Article ID: 225949 - Last Review: October 20, 2013 - Revision: 2.0
APPLIES TO
  • Microsoft Access 2000 Standard Edition
Keywords: 
kbnosurvey kbarchive kberrmsg kbbug kbpending KB225949

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com