Calculated fields

Bee

Registered User.
Local time
Today, 06:09
Joined
Aug 1, 2006
Messages
486
Hi,

I have read that it's not recommended to put calculated fields on a table and they should instead be calculated using a query.

How about if I need to store that calculated value in a table (e.g. field1 + field2 = value in field3)

How can I do that please?

Thanks,
B
 
re:

Hi,
You shouldn't...calculated values can be calculated at runtime in queries or on forms/reports.
Storing the result of the calculation has the possibility of ending up with redundant data which breaks normalization rules. You can store the components which make up the calculation, but the result itself should be freshly calculated at runtime.
HTH
Good luck
 
freakazeud said:
Hi,
You shouldn't...calculated values can be calculated at runtime in queries or on forms/reports.
Storing the result of the calculation has the possibility of ending up with redundant data which breaks normalization rules. You can store the components which make up the calculation, but the result itself should be freshly calculated at runtime.
HTH
Good luck
Do you mean I should put the field to be calculated in a query with the components that make up the calculation and then perform the calculation.

How can I view it. DO i always need to refer to the query if I want to see that field?
 
re:

Yes...exactly...you could of course do the same on a form or report directly if the components are part of objects record source (use an unbound control to display the result)...but if you do it in a query you can access/display the result several times without repeating the steps over and over again.
HTH
Good luck
 
freakazeud said:
Yes...exactly...you could of course do the same on a form or report directly if the components are part of objects record source (use an unbound control to display the result)...but if you do it in a query you can access/display the result several times without repeating the steps over and over again.
HTH
Good luck
That sounds good. Thank you.
 

Users who are viewing this thread

Back
Top Bottom