calculations

  • Thread starter Thread starter matt shudy
  • Start date Start date
M

matt shudy

Hi,

Is there a way to calculate values inside a table? If I
have two cells "Hours" and "Incidents" and I want to
figure out the Incident Rate, I have to take
(Incidents*200000)/Hours , Is there a way to do this right
in the table, and not make a query? If so please explain
what I would have to do.

Thanks,

Matt
 
You could also add a textbox on a form or report to perform the calculation
without storing the value in the table nor having to create a query.

In addition to support Andrew's statement, calculated values should never,
never be stored in a table. Calculated values change over time as data
changes. In order to make these changes stay accurate you would have to
update them with every change on a record. This is also considered bad
design.
 
matt shudy said:
Hi,

Is there a way to calculate values inside a table? If I
have two cells "Hours" and "Incidents" and I want to
figure out the Incident Rate, I have to take
(Incidents*200000)/Hours , Is there a way to do this right
in the table, and not make a query? If so please explain
what I would have to do.

Thanks,

Matt

I'm no expert myself, but I think it is not a wise idea to do this. It is
derivable data and you should never store that in your base table. If your
database is not too big the extra diskspace might not be that much of a
problem but the potential for faulty data making it's way into your database
is very real (change one of the two variables and forget to change the
calculation field...). I don't think it's possible to do what you would like
to do and for the reason just mentioned.
It is of course possible to make a query that's based on the table, add a
field which does the actual calculation and hiding the Hours and Incidents
fields. In essence that would be what you would like to do? If you want to
use a form to manipulate the data in your table you could also use the form
to make the calculations on the fly and show the result, no need to store
the result of the calculation in your original table.

Best regards,
Willem van der Berg.
 
Back
Top