I'm having some issues with math functions in MS Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nieru Kitera
    New Member
    • Jul 2010
    • 4

    I'm having some issues with math functions in MS Access

    I'm trying to build a database for all our customers that includes a labor charge, service call charge, parts charge and a grand total. I'm pretty good in math, but to avoid errors, I'd like to make the grand total column automatically compute the sum of the previous three columns. Is this possible, and if so, please explain how to do it, and please, keep in mind that I've never used access in my life.
  • Nieru Kitera
    New Member
    • Jul 2010
    • 4

    #2
    Oh, and I'm using Access 2000

    Comment

    • slenish
      Contributor
      • Feb 2010
      • 283

      #3
      Hello,

      first off this is possible, but you have to ask yourself a couple of questions. Are you trying to create this input - output to display on a form, print out in a report, show only on a table, or a combination of all the above?

      If you can answer these questions it will help us to find a solution for you easier :)

      Comment

      • Nieru Kitera
        New Member
        • Jul 2010
        • 4

        #4
        Just on the table. It's a very small database, only for repair customers. I actually have not built any reports or forms yet.

        Comment

        • slenish
          Contributor
          • Feb 2010
          • 283

          #5
          Hello again,

          Well it would be very long and confusing im sure if i explain how to do this so i just built a simple db for you to learn from. What i did was create a sample table with dummy numbers in it. Im guess that each field would contain money values, based on the types of fields you were using. Next i built a small query that runs a calculating expression to total up the numbers from your table.

          you can play with the table and put in any dummy money amounts then save the table. Then all you have to do is open the query and it will calculate it for you.

          I hope this helps.
          Attached Files

          Comment

          • Nieru Kitera
            New Member
            • Jul 2010
            • 4

            #6
            Thanks, I think that will do the trick

            Comment

            • slenish
              Contributor
              • Feb 2010
              • 283

              #7
              Your welcome :)

              Comment

              • NeoPa
                Recognized Expert Moderator MVP
                • Oct 2006
                • 32656

                #8
                Nieru,

                You really don't want to store this value to your table as that would only be creating a rod for your own back (See Normalisation and Table structures for why).

                Instead, simply use a query any time you need it and have the value worked out in the query. Something like :
                Code:
                TotVal: =[FieldA] + [FieldB] + [FieldC]

                Comment

                Working...