Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

This article was previously published under Q282336
For a Microsoft Office Access 2003 version of this article, see 827490 (http://support.microsoft.com/kb/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).

For a Microsoft Office Access 2003 version of this article, see 827490 (http://support.microsoft.com/kb/827490/).

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


Status

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

↑ Back to the top


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.

↑ Back to the top


Keywords: KB282336, kbsetup, kbnofix, kbbug, kbtshoot, kberrmsg

↑ Back to the top

Article Info
Article ID : 282336
Revision : 5
Created on : 11/24/2004
Published on : 11/24/2004
Exists online : False
Views : 253