MS Access Multiplication problem ...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Irshad Arose
    New Member
    • Nov 2010
    • 3

    MS Access Multiplication problem ...

    Hello There , I find it hard to do this , I have created a table in which I have a Unit Cost field,QTY field, and a Total Cost Field . What I want is to when I type the quantity in the QTY field and the Unit Cost I want the Total Cost to be auto Generated how do I do this. Please help. Thank you
    AJ
    Attached Files
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    Hi. A basic principle is that you should never store a value which can be derived from what you already have. In other words, you don't need to STORE a total when you can CALCULATE that total given the quantity and unit cost (although you will also need to know any tax rates which are applicable before coming up with a definitive total for that item).

    Should you still wish to store the total, even though you really should not do so, you can use the After Update event of the quantity and unit cost controls to calculate the total and place the result into your totals field.

    -Stewart

    Comment

    • Irshad Arose
      New Member
      • Nov 2010
      • 3

      #3
      Thank you for your kind response , but I have to be totally frank with you I am a fresher and really don't understand what you said if you can kindly mention me the way I am supposed to do it, it will help me a lot sorry for bothering you. I truly don't understand as I am new to Access yet I have this assignment to complete in order to get an entrance to the college. Thank you once again for you kind response and for the time you took to reply. may god bless you .... (BTW I am a student and desperately in need of assistance and advice from experts and thank you and thanks byte.com )

      Irshad
      AJ

      Comment

      • Ryno Bower
        New Member
        • Nov 2010
        • 76

        #4
        Hello AJ. What you can do is create a query and let the query do the calculation. Your calculation will not be stored though. Use the query wizard then add the table. Then drag and drop the fields that you want to see on your query. Then go to a new blank space on the bottom of the screen where you just dropped the fields. Type the following. TotalValue: =[Unit Cost]*[Qty]. Save the query and when you enter data it should calculate the value for you. Or you can use the after update event if you have a form based on the underlying table. Let me know if you have a form then i can guide you throug the steps. Your values will be stored then. Good luck. Ryno

        Comment

        Working...