InteropUserControl in Access 2007 not persisting is Custom Properties


  • I created an ActiveX Control with the InteropUserControl of the Interop Forms Toolkit 2.1 in Visual Studio 2008 and the problem is I can't get my custom properties to persist in Access 2007 but it is working in an Excel 2007 UserForm so my actual code is good.

    There must be something special to implement for Access but can't find anything on the subject... Any hint on what to look for would be appreciated.


    quarta-feira, 14 de setembro de 2011 18:51

Todas as Respostas

  • Hi VAlain,

    What kind of custom properties could not be persisted? Do you get any errors or exceptions? Could you please describe more specific?

    Have a nice day.

    Best regards

    Liliane Teng [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    segunda-feira, 19 de setembro de 2011 03:22
  • Hi Liliane,

    I tested with a String and an Integer both are not persisted in Access but they are in Excel. I have no error and no exception. I even tried the property ForegroundColor an Integer that is part of the Toolkit as an example and it is also not persisted in Access.

    Have a nice day.


    Alain V.

    segunda-feira, 19 de setembro de 2011 05:04
  • I have done some more testing and found that the property change are persisted just after droping the control in the form but after they are not persisted anymore. Still no error of any kind and only with Access.

    segunda-feira, 19 de setembro de 2011 15:06
  • I tried in Access 2010 and I had the same problem...

    To resume I created a new Interop UserControl Project in VB 2010 and made absolutly no modification to it since it already have some example properties like Foregroundcolor, BackgroundColor...

    When I drop a new InteropUserControl on an Access Form I can change the BackgroundColor property and the change will be persisted after closing the form but after that if I go back in the Form to change the BackgroundColor property the change will not persist anymore...

    If I do the same in Excel the changes are always persisted...

    quinta-feira, 29 de setembro de 2011 15:00