title: Multiplying values from two Access tables
body: <p>I have two tables as below in Accecss 2007.</p>
  
  <pre><code>Town Table
  ----------
  TownName | FlatCount | DetachedCount | SemiCount
  A        | 5         | 3             | 4
  B        | 2         | 6             | 3
  
  Cost Table
  ----------
  Prop     | PCost
  Flat     | 10
  Detached | 20
  Semi     | 30
  </code></pre>
  
  <p>I would like to get an output like below by multiplying the Count from the Town table with the corresponding PCost in the Cost table.  <code>FlatCost = Town.FlatCount * Cost.PCost</code> for a flat.</p>
  
  <pre><code>Results
  -------
  Town | FlatCount | FlatCost | DetachedCount | DetachedCost | .....
  A    | 5         | 50       | 3             | 60           |
  B    | 2         | 20       | 6             | 120          |
  </code></pre>
  
  <p>I have tried to do this by using IIF, but not sure how to get PCost for each property type within the IIF clause.</p>
  
  <p>Thanks</p>