title: Ms Access need to make a calculation based on multiple criteria on same table field
body: <p>i would like to ask the following question about a simple MS Access project,</p>
  <p>I have a table with 4 fields A,B,C,SUM i would like to create a form to get the values A,B,C (done that) and a query to calculate a result based on multiple criteria of the table fields:</p>
  <pre><code>IF A&lt;=5 AND B&lt;=2 THEN SUM = X1 value  + Y1 value + (C * Z1 value) + H
  IF A&gt;=5,01 AND A&lt;50 AND B&lt;=2 THEN SUM = X2 value  + Y2 value + (C * Z1 value)+ H
  IF A&gt;50 AND B&lt;=2 THEN SUM = X3 value  + Y3 value + (C * Z1 value)+ H
  </code></pre>
  <p><em>(X1, X2, X3, Y1, Y2, Y3, Z1, Z2, H are integer values that i already have)</em></p>
  <pre><code>IF A&lt;=5 AND B&gt;2 THEN SUM = X1 value  + Y1 value + (C * Z1 value)+ H
  IF A&gt;=5,01 AND A&lt;50 AND B&gt;2 THEN SUM = X2 value  + Y2 value + (C * Z1 value)+ H
  IF A&gt;50 AND B&gt;2 THEN SUM = X3 value  + Y3 value + (C * Z1 value)+ H
  </code></pre>
  <p>Can someone help me on how to achieve this formula,
  I guess i have to build a query, but can someome guide me on the syntax ?</p>
  <p>Thank you all in advance. !!!</p>