title: setting control source property of a textbox of subform in its parent form in ms access?
body: <p>I have a textbox on a subform the controlsource property of which is to be changed on click of a label on the parent form of the same. I have tried the following ways none of which worked at all,</p>
  
  <pre><code>Form_frmWOMAINMENU.[frmWOMAINSUBMENU].Form.[txtDate].Control.ControlSource _
                                                     = "Raised"
  
  Forms("frmWOMAINMENU").[frmWOMAINSUBMENU].Form.[txtDate].ControlSource _
                                                     = "Raised"  
  
  Me.[frmWOMAINSUBMENU].Form.[txtDate].ControlSource = "Raised"
  </code></pre>
  
  <p>Can anyone suggest me how it works?</p>
  
  <p><code>frmWOMAINMENU</code> is the parent form and <code>frmWOMAINSUBMENU</code> is the subform.
  Also, "Raised" comes from a sql query written as string in the vba code.
  I tried the same in the subform like this:
      <code>me.txtDate.ControlSource="Raised"</code> 
  and it worked fine.However,I cannot change control source of the textbox thrice in the subform.</p>