I'm using a self-authored ActiveX control on an MS Access form. On adding the Active X control, I can set a custom design time property without issue. However, if I go back into design mode to change the value of the design time property, the property change is not retained. Appreciate for guidance on why design time change to custom property is not retained. Is the ActiveX control design missing some required functionality to retain design mode property changes? To recreate the issue:
Using the ActiveX control in C# as per Microsoft sample found at C# ActiveX Control (CsActiveX)
- After compiling the sample, open MS Access, add a reference to the CsActiveX.tlb from the C# project.
- Add the CsActiveX control (csActiveX.CSActiveXCtrl) to a form and set it's custom 'FloatProperty' to 5. Save the form.
- Open form in 'Form View' and the float property is displayed as expected i.e. 5.
- Re-open the form in design mode and change the 'FloatProperty' to 8. Save design changes.
- Re-open form in 'Form View' but the float property is displayed as 5 and not 8 as expected. i.e. the change in design mode was lost!
Fyi, if I use the ActiveX control in a c# Win Forms application, the control works as expected. Also, I'm inexperienced in ActiveX control design and am using this sample as a base on which to design my own custom controls for use in VBA.