title: Accessing Control/Form-Objects through Classes leads to reinitialization
body: <p>I have a main form with a register and a few subforms. I'm using class modules and I save the name of the forms in it, to make the access to them easy. The corresponding variable to access the class gets saved in a module and is set (new) on_load in a form (clsMod). Before the first access my main form calls a function which 'initializes' the values in the class module (initial_form), to make them accessible. That works like a charm, so far. </p>
  
  <p>But when I now try to access the value, f.e. with clsMod.detailsControl or clsMod.detailsControl!fieldXy my class module gets initialized again a thus looses all bound objects. I suppose I am not allowed to use Controls / Forms like that? There is no error, except of course 'Object variable, or with block variable not set', which occurs afterwards.</p>
  
  <pre><code>Private m_ctldetailsControl As control
  
  Public Sub initial_form()
    Set detailsControl = Forms!mainForm_ufoMainForm
  End Sub
  
  Public Property Get detailsControl() As control
    Set detailsControl = m_ctldetailsControl
  End Property
  
  Public Property Set detailsControl(ctlDetailsControl As control)
    Set m_ctldetailsControl = ctlDetailsControl
  End Property
  </code></pre>
  
  <p>I narrowed it down to the fact that the class module just gets initialized again, when I access the control-object from the 'outside' (I put a timestamp in the Class_Initialize() and can see when there is a new initialization), I just don't know why. Same happens when I use Form-Objects instead of Control-Objects.</p>
  
  <p>I can eliminate the my code resets the class-module, because it only gets set once during the load process (set clsMod = new clsModification). Everything else inside that class works fine, I can access the property from inside the class without reinitializing itself.</p>
  
  <p>Any ideas or further reading regarding this topic would be greatly appreciated, for any other details just ask!</p>
  
  <p>A few additions:</p>
  
  <ul>
  <li>The class variable is located as "public clsMod As clsModuleXy" in a module</li>
  <li>it gets set in the onLoad Event of my form (set clsMod = new clsModuleXy)</li>
  <li>set-property works fine (as descriped above)</li>
  <li>get property works fine inside the class-module (as descriped above)</li>
  <li>when I use the get property outside of the class module a new instantiation happens (if I set a local control/form to that property or want to access a field)</li>
  </ul>