General Computations

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tbeers
    New Member
    • Nov 2007
    • 63

    General Computations

    I am createing a sales tracking program. Is there any advnatage to haveing math computed at the table level...or is it better to do the math on the forms and reports?

    Thanks

    -TomB
  • hjozinovic
    New Member
    • Oct 2007
    • 167

    #2
    General rule with databases is that calculations should be done at the moment we use data. This way we ensure to have only newest 'results'.
    Also we save space (memory) by storing only original data from which we can make calculations the moment we need them.

    We can use calculations to update the original data and that is OK, but generally we store only input data.

    If by 'table level computations' you meant queries then YES it's usualy better/faster to make calculations in queries than on forms or reports.

    Comment

    • missinglinq
      Recognized Expert Specialist
      • Nov 2006
      • 3533

      #3
      And If by 'table level computations' you meant "in tables" you can't! The closest you can come is, as has been suggested, in queries. The advantage of doing it in a query is that you only have to do it once, instead of every time you need the results. In the Query Grid you would create a calculated field. Where the Field name goes, you'd do something like this:

      Area: [Length]*[Width]

      Then in forms or reports, use Area as the Control Source for your textboxes.

      Linq ;0)>

      Comment

      • tbeers
        New Member
        • Nov 2007
        • 63

        #4
        thanks...with the resulting responses...I knew that the query was the most efficient way to get calculations... but I had forgotten that I knew.

        Thanks

        TomB

        Comment

        Working...