Microsoft Knowledge Base Email Alertz

(918574) - Describes two methods to register or to unregister ActiveX controls in Access 2007.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 918574 - Last Review: November 3, 2006 - Revision: 1.1

How to register or unregister ActiveX controls in Access 2007

This article applies to a Microsoft Access database (.mdb), a Microsoft Access project (.adp), and a Microsoft Access 2007 database (.accdb).
Moderate: Requires basic macro, coding, and interoperability skills.

INTRODUCTION

This article describes how to register or unregister an ActiveX control in Microsoft Office Access 2007.

MORE INFORMATION

In earlier versions of Access than Access 2007, you could register or unregister an ActiveX control by clicking ActiveX Controls on the Tools menu. In Access 2007, you cannot use this method. If you want to register or unregister an ActiveX control, use one of the following methods.

Method 1: Use Visual Basic code

To use Visual Basic code to register or unregister an ActiveX control, run the code directly in the Immediate window, or create a module that contains the code.

To run the Visual Basic code directly in the Immediate window, follow these steps:
  1. In Access 2007, open a trusted database, or enable macros in the database.
  2. Press CTRL+G to open the Immediate window.
  3. Type the following code, and then press ENTER.
    DoCmd.RunCommand acCmdRegisterActiveXControls
To create a module that contains the Visual Basic code, follow these steps:
  1. In Access 2007, open a trusted database, or enable macros in the database.
  2. On the Create tab, click Macro in the Other group, and then click Module.
  3. Create a subroutine that includes the following Visual Basic code.
    DoCmd.RunCommand acCmdRegisterActiveXControls
  4. Press F5 to run the code.

Method 2: Use the RunCommand macro action

  1. In Access 2007, open a trusted database, or enable macros in the database.
  2. On the Create tab, click Macro in the Other group, and then click Macro.
  3. On the Design tab, click Show All Actions in the Show/Hide group.
  4. In the Action column, click RunCommand, and then click RegisterActiveXControls in the Command list.
  5. Click Save.
  6. In the Tools group, click Run.

APPLIES TO
  • Microsoft Office Access 2007
Keywords: 
kbhowto kbexpertisebeginner KB918574
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate