This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
- You imported forms or reports that contain code modules or standalone modules into a new Microsoft Access 2000 database by using Microsoft Access 2000.
- You copied and pasted forms or reports that contain code modules or standalone modules into the Microsoft Access 2000 database by using Microsoft Access 2000.
- Open a form or a report in Design view.
- Save the code behind the form or the report as a text file.
- Set the form or the HasModule property of the report to No, and then save the object.
- Repeat step 1 through step 3 for each form and report in the database.
- Save each module as a text file.
- Create a new blank database.
- On the File menu, point to Get External Data, and then click Import. Import all tables, queries, forms, reports, data access pages, and macros to the new database.
- Restore the code behind each form and each report from the text files that you created in step 1 through step 4.
- Import each text file that you saved in step 5 as a new module.
Using Access 2000Method 1
To prevent this problem from happening again, obtain the latest service pack for Microsoft Office 2000. You must install this service pack on all computers that run Office 2000.
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
For additional information about how to obtain Office 2000 Service Release 1/1a (SR-1/SR-1a), click the following article number to view the article in the Microsoft Knowledge Base:
- When you import to a new database, create a new database and import the objects into the new database. Or, when you copy objects in the current database, copy and paste the objects into the current database.
- Before closing the database, open the Visual Basic Editor by pressing ALT+F11.
- On the Debug menu, click Compile <database name>.
- After you compile the database, close and save the database. Note that when you reopen the database and view the code, the error message that is mentioned in the "Symptoms" section of this article does not occur.
Steps to Reproduce the Behavior
- On a computer that has both Microsoft Access 2000 and version 188.8.131.52 of the Vbe6.dll installed, open Microsoft Access 2000.
- In Microsoft Access 2000, create a new blank database and name it ImportTest.mdb.
- On the File menu, point to Get External Data, and then click Import.
- Browse to the sample database Northwind.mdb for Microsoft Access 2000.
- In the Import Objects dialog box, click the Modules tab.
- Click the Startup module, and then click OK.
- After successfully importing the Startup module, close the ImportTest database.
- In Microsoft Access 2000, open the ImportTest database.
- Open the Startup module in Design view. Note that you receive one of the error messages that is mentioned in the "Symptoms" section of this article, and you are then unable to view the code for the Startup module.
Article ID: 304548 - Last Review: Apr 7, 2006 - Revision: 1