ACC2000: Error Converting a Database with a Large Number of Forms That Have Modules
ID: Q225949
|
The information in this article applies to:
Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access database (.mdb).
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 this to be a problem in the Microsoft products listed
at the beginning of this article.
MORE INFORMATION
Steps to Reproduce Behavior
-
Create a new blank database in Access 97 and name it ManyForms.mdb.
-
In the new database, click Modules under Objects, and then click New.
-
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
-
On the View menu, click Debug Window.
-
In the Debug window, type the following line, and then press ENTER:
CreateManyForms
-
Close the module and don't save the changes.
-
Close the database and quit Access 97.
-
Open Access 2000.
-
On the File menu, click Open.
-
Locate the ManyForms.mdb and open it.
-
When prompted, click Convert Database, and then click OK.
-
During conversion, you receive the following message:
The Visual Basic for Applications project in the database is corrupt.
-
Click OK.
-
If the conversion process creates the new database, open any form in Design view.
-
On the View menu, click Code. Note that no module opens.
Additional query words:
pra
Keywords : kberrmsg kbdta CnvProb
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug