You cannot run the Visual Basic for Applications code in your Access 2000 run-time application if you removed Access 2002 (282336)



The information in this article applies to:

  • Microsoft Access 2002
  • Microsoft Access 2000

This article was previously published under Q282336
For a Microsoft Office Access 2003 version of this article, see 827490.
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

SYMPTOMS

When you start a Microsoft Access 2000 run-time application after you uninstall Microsoft Access 2002, including a Microsoft Access 2002 run-time application, you may experience either of the following symptoms:
  • Visual Basic for Applications code fails to run but does not return any error message.
  • You receive the following error message when you run Visual Basic for Applications code:
    The expression On event you entered as the event property setting produced the following error: There was a problem referencing a property or method of the object.

    * The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].

    * There may have been an error evaluating the function, event, or macro.

CAUSE

When Setup removes Microsoft Access 2002, Setup unregisters the Access.Application object in the Windows registry. This causes any Visual Basic for Applications code in Microsoft Access to not function.

RESOLUTION

Follow these steps to reinstall Microsoft Access Runtime:

NOTE: Because there are several versions of Microsoft Windows, the following steps may be different on your computer. If they are, see your product documentation to complete these steps.
  1. Click Start, point to Settings, and then click Control Panel.
  2. In Control Panel, double-click Add/Remove Programs.
  3. In the Add/Remove Programs dialog box, click Microsoft Access 2000 Runtime in the list of installed programs, and then click Change.
  4. In the Microsoft Access 2000 Maintenance Mode dialog box, click Repair Microsoft Access 2000 Runtime.
  5. In the Reinstall/Repair Microsoft Access 2000 Runtime dialog box, click the Reinstall Access Runtime option. The Repair errors in my Access Runtime installation option will not correct the problem.
  6. Click Finish.
  7. If you are prompted to restart the computer, click Yes.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Start Microsoft Access 2000.
  2. Open the sample database Northwind.mdb.
  3. On the Tools menu, click Startup.
  4. Click the arrow in the Display Form/Page box, and then click the Main Switchboard form.
  5. Click OK to close the Options dialog box.
  6. On the Tools menu, point to Macro, and then click Visual Basic Editor.
  7. Start the Package and Deployment Wizard. For information about how to do so, click the article number below to view the article in the Microsoft Knowledge Base:

    236143 MOD2000: How to Start the Package and Deployment Wizard

  8. Create an installation package and use the defaults on each page of the wizard. Be sure to select the Include Access Runtime check box so that Access Runtime is included in the package.
  9. On a computer that does not have Microsoft Access installed, install the Northwind run-time application. During Setup, you may receive an error that Msjro.dll could not be registered. If you receive this error, click Ignore.
  10. After the application has been installed, start it and then verify that it works.
  11. Close the Northwind run-time application.
  12. Install Microsoft Access 2002, and then verify that both it and the Access 2000 Northwind run-time application work.
  13. Uninstall Microsoft Access 2002.
  14. Start the Microsoft Access 2000 Northwind run-time application.
  15. Click a button on the Main Switchboard form to open another form.
Note that you receive the error message that is mentioned in the "Symptoms" section of this article.

Modification Type:MajorLast Reviewed:11/24/2004
Keywords:kbsetup kbtshoot kbbug kberrmsg kbnofix KB282336