title: Call method from another form
body: <p>I have a navigation form with two subforms that looks something like this:</p>
  
  <p><img src="https://i.stack.imgur.com/rP7wS.png" alt="enter image description here"></p>
  
  <p>When the button in Subform A is clicked, I would like to call a method from Subform B. The method is defined like this:</p>
  
  <pre><code>Public Sub MyMethod()
      Debug.Print "MyMethod called"
  End Sub
  </code></pre>
  
  <p>I tried using <code>Forms!SubformB.MyMethod</code> but I get the error <code>Database cannot find the referenced form 'SubformB'</code>. Referring to <a href="http://access.mvps.org/access/forms/frm0031.htm" rel="nofollow noreferrer">this</a> page, I also tried <code>Forms!NavigationForm!SubformB.MyMethod</code> but then I get <code>Database cannot find the referenced form 'NavigationForm'</code>. Does anyone know how to do this properly?</p>
  
  <p>Thank you.</p>