title: Access: trying to open a form and populate a textbox with the value from another form
body: <p>Okay, I'm obviously doing something wrong, but can't figure out what it is, and this should be pretty simple.</p>
  
  <p>I have a button on a form that opens another form and populates a textbox in the second form with a value from the first form.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>Private Sub test_Click()
  DoCmd.OpenForm "subfrm_EA_COMMENT_ADD"
  Forms!subfrm_EA_COMMENT_ADD.txtUWI = Me.txtUWI
  End Sub
  </code></pre>
  
  <p>This works just fine, however I want the form to open in a dialog window, so I modified the script to this:</p>
  
  <pre><code>Private Sub test_Click()
  DoCmd.OpenForm "subfrm_EA_COMMENT_ADD", acNormal, , , acFormAdd, acDialog
  Forms!subfrm_EA_COMMENT_ADD.txtUWI = Me.txtUWI
  End Sub
  </code></pre>
  
  <p>Now I am getting a run-time error 2450.</p>
  
  <p>I've searched around regarding this error, but can't find any answers that work.</p>
  
  <p>Can anyone point me in the right direction as to what I'm missing?</p>
  
  <p>Thanks!</p>