Microsoft KB Archive/282336

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

Article ID: 282336

Article Last Modified on 11/24/2004

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition
 * Microsoft Access 2000 Standard Edition

-



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  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.



Steps to Reproduce the Behavior
 Start Microsoft Access 2000.</li> Open the sample database Northwind.mdb.</li> On the Tools menu, click Startup.</li> Click the arrow in the Display Form/Page box, and then click the Main Switchboard form.</li> Click OK to close the Options dialog box.</li> On the Tools menu, point to Macro, and then click Visual Basic Editor.</li> 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

</li> 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.</li> 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.</li> After the application has been installed, start it and then verify that it works.</li> Close the Northwind run-time application.</li> Install Microsoft Access 2002, and then verify that both it and the Access 2000 Northwind run-time application work.</li> Uninstall Microsoft Access 2002.</li> Start the Microsoft Access 2000 Northwind run-time application.</li> Click a button on the Main Switchboard form to open another form.</li></ol>

Note that you receive the error message that is mentioned in the &quot;Symptoms&quot; section of this article.

Additional query words: pra art runtime run time onclick onopen click open OfficeErrorMessages 10009

Keywords: kberrmsg kbtshoot kbbug kbnofix kbsetup KB282336

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.