title: Why can't Ms Access find referenced form?
body: <p>I'm building a database in which I keep records of employees I work with. When someone is logged into the database and opens the form containing an employee's information, the shouldn't be able to change that information. So when the form opens, all the fields should be visible, but disabled. The code I use is:</p>
  
  <pre><code>DoCmd.OpenForm "frm_Pers_Toev", , , "[PersID]=" &amp; [lstPers], acFormEdit, acDialog
  Forms!frm_Pers_Toev!Naam.Enabled = False
  </code></pre>
  
  <p>When I run this code, the form opens properly, but the field isn't disabled. Instead, I get the runtime error 2450 "Microsoft Access cannot find the referenced form "frm_Pers_Toev".</p>
  
  <p>I use the same sort of method for different forms and then it works fine.</p>
  
  <p>What can I do?</p>