title: Run procedure in another form
body: <p>I’m trying to run a procedure in my form ‘frmInvoiceAdd’ from my other form ‘frmDisclosure’. It’s not a Form/SubForm relationship. They are separate. The Procedure in ‘frmInvoiceAdd’ is:</p>
  
  <pre><code>CmdInvoice on click:
  Public Sub CmdInvoice_Click()
  On Error GoTo CmdInvoice_Click_Err
  
  On Error Resume Next
  DoCmd.GoToRecord , "", acNewRec
  DoCmd.GoToControl "InvDate"
  Me.InvDate = Date
  DoCmd.RunCommand acCmdSaveRecord
  
  DoCmd.RunSQL "UPDATE tblInvoices SET tblInvoices.DiscFK = [Forms]!
  [frmDisclosure]![DiscPK], " &amp; _
               "tblInvoices.ClientFK = [Forms]![frmDisclosure]![ClientFK], 
  tblInvoices.ReceiptFK = [Forms]![frmDisclosure]![ReceiptFK] " &amp; _
               "WHERE (((tblInvoices.InvoicePK)=[Forms]![frmInvoiceAdd]!
  [InvoicePK])) "
  
  CmdInvoice_Click_Exit:
  Exit Sub
  
  CmdInvoice_Click_Err:
  MsgBox Error$
  Resume CmdInvoice_Click_Exit
  
  End Sub
  </code></pre>
  
  <p>I’m trying to run this from ‘frmDisclosure’ by:</p>
  
  <pre><code>DoCmd.OpenForm "frmInvoiceAdd"
  Run Forms!frmInvoiceAdd.CmdInvoice_Click
  DoCmd.Close acForm, "frmInvoiceAdd"
  </code></pre>
  
  <p>I get this error message:</p>
  
  <p>Microsoft Access can't find the procedure '.'
  It highlights:
  Run Forms!frmInvoiceAdd.CmdInvoice_Click</p>
  
  <p>I’ve tried changing ‘Run’ to Call but I get this error message:
  ! Expected: . or (</p>