Article ID: 160500 - Last Review: January 19, 2007 - Revision: 3.1 ACC97: Compilation Error After Converting NWIND.MDB in Access 97This article was previously published under Q160500
Moderate: Requires basic macro, coding, and interoperability skills.
On This PageSYMPTOMS
When you convert the Microsoft Access 2.0 sample database NWIND.MDB to
Microsoft Access 97, you receive the following error message:
There were compilation errors during the conversion or enabling of this
database.
CAUSE
The version of Microsoft Visual Basic for Applications in Microsoft Access 97 has the same naming restrictions as the full version of Microsoft Visual Basic 5.0. This version of Visual Basic for Applications now restricts the use of the following keywords as identifiers in a Visual Basic for Applications module:
AddressOf, Decimal, DefDec, Enum, Event, Friend, Implements, RaiseEvent, WithEvents
When you convert a database from an earlier version of Microsoft Access to Microsoft Access 97, existing identifiers that are the same as new Visual Basic keywords cause a compile error.
In this example, NWIND.MDB uses an identifier called Event in the ShowEvent procedure of the Utility Functions module. RESOLUTION
After you convert NWIND.MDB to Microsoft Access 97, do the following to
fully compile the project:
MORE INFORMATIONSteps to Reproduce Behavior
REFERENCES
For more information about reserved keywords in Microsoft Access 97, search
the Help Index for "scoping levels," and then view the topic "Scoping and
Object-Naming Compatibility."
| Article Translations
|


Back to the top
