The information in this article applies to:
SYMPTOMS
Moderate: Requires basic macro, coding, and interoperability skills.
CAUSE
This compile error will occur in Microsoft Access 97 or Microsoft Access
for Windows 95 version 7.0 if your application uses methods or properties
in a referenced database that has not been included in the application
distribution set or if Microsoft Access cannot establish a valid
reference. (Wizards in Microsoft Access 97 and in Microsoft Access 7.0
are shipped in a compiled state and cannot be referenced.)
RESOLUTIONRemove or modify the code in your application that refers to the WZLIB.MDA file, or to any other file that is not referenced (in Microsoft Access 97 and 7.0) or not loaded (in version 2.0). MORE INFORMATIONMicrosoft Access 97 and Microsoft Access 7.0The Microsoft Access 97 and Microsoft Access 7.0 run-time environment uses the same executable file (Msaccess.exe) as the full Microsoft Access environment. To test the run-time application on a computer with full Microsoft Access installed, start the application using the run-time switch on the command line. For example, the following command line starts Microsoft Access and opens the Northwind sample database in the run-time environment.NOTE: In the following example, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of the line when re-creating this example. Microsoft Access 97:
Microsoft Access 7.0:
If a compile error occurs on one computer but not when opened as a run-time
application on the development computer, you may have referenced methods or
procedures contained in a file that you failed to distribute.
To check the references that are available on the development computer, open the application in full Microsoft Access. On the View menu, click Code to open a code module. On the View menu, click Object Browser. If the drop down list labeled Libraries/Databases contains a custom database and if you have used a function, method, or property from it, you must distribute that custom database with your application. Microsoft Access Version 2.0The WZLIB.MDA library database contains routines and utilities used by the Microsoft Access Wizards and by other code. For example, the Reattach NWIND module in the SOLUTION.MDB database (a sample database shipped with Microsoft Access version 2.0) includes a function that refers to WZLIB.MDA.If you include code in your application that refers to the WZLIB.MDA file, and then run your application with the retail version of Microsoft Access, the application will run correctly. However, if you run the Setup Wizard to create distribution disks for your application, and correctly modify the initialization (.INI) file for the application to remove the Wizard files from the [Libraries] section, you will receive a compile error when you run the application as a run-time application. Note that error-trapping routines that you may have included in your code will not be called, because these routines cannot trap compile errors. To discover which section of your code is causing the compile error, run your application with the retail version of Microsoft Access, but with your application's custom .INI file. For example, to run an application called MYAPP.MDB with a custom .INI file called MYAPP.INI, create an icon with the following command line. NOTE: This example assumes that you have Microsoft Access installed in the ACCESS directory on drive C, and that the MYAPP.MDB application is in the MYAPP directory on drive C.
This command will run the MYAPP.MDB application with only the libraries
specified in the [Libraries] section of the custom MYAPP.INI file. Compile
your application's code at this point to locate the cause of the compile
error.
NOTE: If you open a module in Design view and then choose Compile Loaded Modules from the Run menu, code in any form or report modules will not be compiled. To compile code in form and report modules, the forms and reports must be open in Design view. REFERENCESFor additional information on compile errors, please see the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q160870For more information about compile errors, search the Help Index for "compiling, resolving errors," or ask the Microsoft Access 97 Office Assistant. Additional query words: autodialer reattachtables runtime
Keywords : kberrmsg PrgrmLib |
Last Reviewed: July 21, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |