none
Creating a COM ctrl to for Access 2007 RRS feed

  • Question

  • Hi Folks,
      I am just trying to create a basic COM control using C# Visual Studio 2008 that will be used by an Access 2007 application.  The control is very simple, couple of properties and a method with no UI.

    To create the control I just did the old  New Class Library project, add an interface, add an implementation class, added a reference to System.runtime.interopServices.  Then in properties, I set register for COM interop, sign the project with a key and compile.

    When I run Access and type the DoCmd.RunCommand acCmdRegisterActiveXControls,  I am getting  MyCtrl could not be added/deleted. Install/remove the control using a separate setup utilty.

    Does anyone have any ideas on what needs to happen next.  I've been messing with regsvr32/regasm but to no avail.  Not sure if I am missing something from the code, or missing something in the install process.

    Regards
    Andy

    Update: Sorry I forgot, what I would like to do is get it so that it shows up in the 'available controls list' for the above DoCmd... statement.
    Monday, April 20, 2009 2:38 AM

Answers

  • In the end I used a Visual Studio 2008 Extensibility project - Shared AddIn.   Due to the highly relevant and up-to-date documentation that Microsoft provide, this was a quick and painless exercise :)

    • Marked as answer by AndyW2007 Wednesday, April 22, 2009 3:45 AM
    Wednesday, April 22, 2009 3:45 AM