title: Access 2007 - saving calculation in access table
body: <p>I have used access in the past, but on a very limited basis.  </p>
  
  <p>I am trying to take a calculated field on my form and have it save to the database.  </p>
  
  <p>My fields are:  quantity, cost, subtotal</p>
  
  <p>In my form I changed the Control Source of the subtotal field to this:
  =[quantity]*[cost]</p>
  
  <p>The form does show the correct calculation total.</p>
  
  <p>Then under event I created an afterupdate event:</p>
  
  <p>Private Sub subtotal_AfterUpdate()
  Me.subtotal = [quanity] * [cost]
  End Sub</p>
  
  <p>Does not save to the database. </p>
  
  <p>I have tried many different ideas from the internet and they all failed.  So I am missing something.  I do need the subtotal to save to the database as I will use it later in other forms and reports. </p>
  
  <p><strong><em>Actually I probably should clarify I want the RESULT of the calculation to save in the subtotal field, not the calculation itself.</em></strong></p>
  
  <p>Thank you so much,</p>
  
  <p>Kim</p>