title: How do I reference the current form in an expression in Microsoft Access?
body: <p>I'm no Access expert, and I have an (I hope!) simple question...</p>
  
  <p>I have a form with a number of records. In some textboxes I just present values from the underlying table - so they are bound to the corresponding fields.</p>
  
  <p>But some textboxes should contain calculated values. Some calculations are complicated and involves many fields from the table. I write the calculation as a VBA function. I could enter something like this as "Control Source":</p>
  
  <pre><code>=MyFunction([Field1], [Field2], [Field3] ...)
  </code></pre>
  
  <p>But I don't want to list dozens of fields in the function call. Instead, I want to send the whole form (or the current record) as a parameter, and let the function reference the fields it needs. I can do it like this:</p>
  
  <pre><code>=MyFunction([Forms]![MyForm])
  </code></pre>
  
  <p>But I don't like having to name the form in the call. Isn't there a way to send the "current form" as a function argument? In VBA, you just use the "Me" keyword, for exampel "Me![Field1]". But it seems like "Me" isn't accepted in an expression.</p>
  
  <p>Is there some other way to reference the current form in an expression?</p>
  
  <p>(It's a cosmetic question, I know. But it's not good programming to use "[Form]![MyForm]". Later on you copy the controls to another form and forget to change the name in the expression...)</p>
  
  <p>Grateful for your help! :-)</p>
  
  <p>/Anders</p>