Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005
    Posts
    2

    Unanswered: Performing calculations in a form

    I am attempting to perform a calculation in a form. I have a column "price" and a column "tax." I want to make it so the tax column automatically calculates the amount of tax according to price. So my expression/function is =([price]*.085). However, that in turn calculates the tax for all the records. How can I make it so that the the tax shows only the tax for that specific record. And the tax box in the second record only shows the tax for the second record? Is it possible? Thanks! (disclaimer, I'm a beginner at this access thing)

  2. #2
    Join Date
    Feb 2004
    Posts
    533
    Quote Originally Posted by mhue
    I am attempting to perform a calculation in a form. I have a column "price" and a column "tax." I want to make it so the tax column automatically calculates the amount of tax according to price. So my expression/function is =([price]*.085).
    Your formula looks right. The only thing you are saying you have a Tax column. If you are showing this on a form then it is not necessary to have a separate column for tax in the table or a tax field in a realated query. You can add an 'Unbound' Textbox to your form then place your formula in the 'control source' of the textbox (in the properties 'data' tab of the textbox field). Make sure the 'Price' name of the field your calculating matches the Name of the 'Price' Textbox on the form.

    In your formula you have '=([price]*.085)' this can also be written as '=[price]*.085' You only need the parenthesies for longer formulas where you need to define the order of caluation. You can use the 'Expression Builder' tool to define the formula. Just click the "..." button by the control source properties field to open it.
    ~

    Bill

  3. #3
    Join Date
    Feb 2005
    Posts
    2

    it worked!

    Thank You Thank You Thank You! :d

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •