Have a Question?
Table of Contents
< All Topics

Issue: LIMS VBA Project is Not Fully Compiled


The information in this article applies to LIMS 2.x Full System licenses.

During system startup, LIMS checks the compiled state of the system’s Visual Basic for Applications (VBA) project. The VBA project contains all code modules including code behind forms and reports. When the VBA project is not in a compiled state, LIMS issues the following startup warning message:

     The LIMS VBA project is not fully compiled. 
     System performance can be improved by recompiling. 
     Contact your LIMS administrator for assistance.

Using the Recompile option on LIMS’ Admin menu is normally all that is necessary to compile the VBA project. However, in some cases the Recompile option will not eliminate the startup warning message and Access’ Decompile procedure must be used.

More Information

The VBA programming language used by LIMS is a compiled language. Before running any VBA code, Access must compile the code into a machine-executable format. When any VBA code is in an uncompiled state, Access must compile the code on the fly as needed. Since the compilation process takes time, certain tasks in LIMS such as opening a form or previewing a report will take longer when the code is uncompiled.

All of the VBA code exists in LimsCode, LIMS’ front end database. LimsData, the back end database, contains no VBA code. LIMS’ VBA project will become uncompiled when any changes are made to the code in LimsCode. Installing version updates and importing form and report objects into LimsCode may also leave the code in an uncompiled state. To compile the VBA project, use the Recompile option on LIMS’ Admin menu then exit and restart the LIMS. If the startup warning message still appears after recompiling, try recompiling a second time. If the startup warning message is no longer displayed, exit and compact LimsCode then distribute the updated LimsCode to all workstations.

Occasionally, large Access code databases such as LimsCode will not stay compiled after making changes. When two attempts to recompile still produce the startup warning message, a decompile is necessary. Using Access’ undocumented decompile option followed by a recompile will successfully compile the VBA project.

To decompile LimsCode, you will need to copy the Target property of the shortcut used to start the LIMS. If the shortcut is on your Windows desktop, right-click the shortcut and select Properties from the popup menu. If the shortcut is not on your desktop, right-click Windows’ Start button and choose Explore. Under the opened Start Menu folder, expand the Programs folder, select the LIMS for Microsoft Access folder then right-click the LIMS shortcut and choose properties. Choose the Shortcut tab of the properties dialog (see Figure 1) then select all text in the Target property and use Ctrl+C to copy the text to the clipboard. Click OK to close the dialog.

Figure 1. Copying the LIMS shortcut's Target property
Figure 1. Copying the LIMS shortcut’s Target property

Now click Windows’ Start button and select Run. Use Ctrl+V to paste the text into the Open field. Use the backspace key to delete all text following “/cmd” then replace the “/cmd” with “/decompile” (see Figure 2). Click the OK button to proceed. For reference, here is the full text of the copied Target property in our example (your drives and folders may differ):

“C:\Program Files\Microsoft Office\Office\MSACCESS.EXE” /excl “C:Program Files\MSC\LIMS\LimsCode2.mdb” /wrkgrp “D:\Lims\system.mda” /cmd DataDB=D:\Lims\LimsData2.mdb

And the full text in the Run dialog in Figure 2 after editing:

“C:\Program Files\Microsoft Office\Office\MSACCESS.EXE” /excl “C:Program Files\MSC\LIMS\LimsCode2.mdb” /wrkgrp “D:\Lims\system.mda” /decompile

Figure 2. Starting the LIMS with the Decompile option
Figure 2. Starting the LIMS with the Decompile option

When prompted, log on to the LIMS using an account in the Admins security role. LIMS will appear to start as normal, however, you will notice the message Converting database to the currently installed version of Visual Basic in the status bar. After the conversion completes, the dialog shown in Figure 3 will appear.

Figure 3. The Decompile confirmation dialog
Figure 3. The Decompile confirmation dialog

Click OK to dismiss the above dialog then click OK to dismiss the Missing DataDB command line parameter dialog which will close Access. Now start LIMS, use the Recompile option on the Admin menu. Exit the LIMS and compact LimsCode.

Table of Contents