Microsoft KB Archive/184582

From BetaArchive Wiki

Article ID: 184582

Article Last Modified on 1/22/2007



APPLIES TO

  • Microsoft Access 97 Standard Edition
  • Microsoft Office 97 Developer Edition



This article was previously published under Q184582

Moderate: Requires basic macro, coding, and interoperability skills.


SYMPTOMS

When you try to use Jetcomp.exe to compact a Microsoft Access 97 run-time database, you may receive one of the following error messages:

Can't Initialize VBA.

-or-


A required .DLL file, VBAJET32.DLL, was not found.

-or-


The dynamic link library VBAJET32.DLL could not be found in the specified path <pathname>.

CAUSE

Running Jetcomp.exe generates this error when both of the following conditions are true:

  • The database is part of a run-time application that you created with the Microsoft Office 97 Developer Edition Tools (ODE) Setup Wizard.
  • Microsoft Access 97 or Microsoft Office 97 Professional Edition has not been installed on the computer where you installed the run-time application.


RESOLUTION

The Compact utility in Microsoft Jet Database Engine version 3.51 allows you to recover most corrupted databases. You can use the ODE Setup Wizard to create a shortcut with which users can compact a database in your run- time application. For more information, search the ODE Tools Help Index for "shortcuts, in Setup Wizard." If you want to manually create a shortcut that you can use to compact the database in a run-time application, search the ODE Tools Help Index for "compacting, data in run-time applications."

However, if you can't recover a corrupted database with the Compact utility of Microsoft Jet, and if you want to try to compact the database with Jetcomp.exe, use one of the following two methods to prevent the errors described in the "Symptoms" section.

Method 1

Add Vbajet32.dll and Vbar332.dll to the List Of Files in the ODE Setup Wizard. To do so follow these steps.

NOTE: If you search the ODE Tools Help Index for "distributing, files with run-time applications" and click Display, Vbar332.dll does not appear on the list of files that you can distribute with your run-time application. However, you may still include it in the list of files that you want your custom Setup program to copy.

  1. Start the ODE Setup Wizard.
  2. On the first screen of the Setup Wizard, select Use Previously Saved Setup Options and click Next.
  3. In the Load Template dialog box, click the .mdt template file that contains the setup options for your run-time application. Click Open.
  4. Add the following .dll files, which are located in the Windows\System or Winnt\System32 folder, to the list of files that your want your custom Setup program to copy:

       Vbajet32.dll
       Vbar332.dll
                        
  5. Click Next to continue through the rest of the Setup Wizard and rebuild the disk images.
  6. Run Setup to install the run-time application on a computer that is not running Microsoft Access 97 or Microsoft Office 97 Professional Edition.

Method 2

Add the Microsoft Replication Manager component to the run-time application. To do so follow these steps:

  1. Start the ODE Setup Wizard.
  2. In the first screen of the Setup Wizard, select Use Previously Saved Setup Options and click Next.
  3. In the Load Template dialog box, click the .mdt template file that contains the setup options for your run-time application. Click Open.
  4. Click Next until you see the screen that allows you to add redistributable components to your custom Setup program.
  5. Select Microsoft Replication Manager.
  6. Click Next to continue through the rest of the Setup Wizard and rebuild the disk images.
  7. Run Setup to install the run-time application on a computer that is not running Microsoft Access 97 or Microsoft Office 97 Professional Edition.


Note that the Microsoft Replication Manager component includes 12 additional files. Your application may not need these additional files if you are not using Microsoft Replication Manager.


MORE INFORMATION

Steps to Reproduce Behavior


  1. Create a database that contains a form not based on any table or query. Add a label to the form and a command button that quits Microsoft Access.
  2. On the Tools menu, click Startup. In the Display Form box, click to select the form to which you added the label and the command button, and then click OK.
  3. Use the ODE Setup Wizard to create disk images of an application whose main file is the database you created in step 1. On the screen that asks you to add the shortcuts, be sure to click the Database Shortcut Properties tab and select the Run-Time option.
  4. Install the run-time application on a computer on which Microsoft Access 97 or Microsoft Office 97 Professional Edition has never been installed.
  5. Download the updated version of Microsoft Jet 3.5. For more information about how to obtain this file, please see the following article in the Microsoft Knowledge Base:

    172733 ACC97: Updated Version of Microsoft Jet 3.5 Available for Download


    Save the file Jet35sp3.exe in the Windows\System folder or Winnt\System32 folder of the target computer.
  6. Double-click the Jet35sp3.exe file to run it. This installs Msjet35.dll, Msrepl35.dll, and Jetcomp.exe in the Windows\System or Winnt\System32 folder of the target computer.
  7. Restart the computer.
  8. Click the Start button, and then click Run.
  9. In the Open box, type Jetcomp and then press ENTER.

    Note that you receive one of the error messages described in the "Symptoms" section.



Additional query words: repair a required .dll file, vbajet32 dll, was not found can t initialize vba

Keywords: kbprb KB184582