generating statistics from calculated fields

access_learner

Registered User.
Local time
Today, 10:26
Joined
Oct 5, 2004
Messages
13
hello.

recently i was helped with generating stats from table data and showing it on a form.

Now i am trying to generate these stats but i want to generate Age stats.
The thing is that i am calculating Age from the DOB field on the form and not storing it.

Is there anyway i can still generate statistics from say 100 records with DOB and find the Age ??

link to previous stats post - http://www.access-programmers.co.uk/forums/showthread.php?t=74237

eg.

DOB from records = 1/1/1984, 2/2/1982, 5/5/1980, 15/12/1978, 2/15/1984


Age stats | Stats
20 40%
22 20%
24 20%
25 20%

thanks for any help or pointers :)

access_learner
 
how will this help me ???

calculating it in the form or in a query wont really change anything will it ?

i still will have a calculated field.....but this field will not be stored, and therfore not be able to be used in gettng stats
 
a_l,

Pat seems to be gone for the moment, so I'll jump in.

You don't want to store calculated values period. The primary reason is that
in order for you to update your data, you will need a LOT of code
to "reconcile" your existing totals.

For instance, if you have DOB as a data field fine. But what happens if a
month from now, you realize it's a typo. When you change the date
you must also change your "calculated" field.

What happens if you forget, and just go into a table, and change a value?
Your data is incorrect.

What if later, you needed the average/total age for a department? You
need some serious mods to your database.

Anything that you can calculate ... do so. Any other method will leave
your database wide open to human/other errors.

Wayne
 
yeah i kow that you dont store calculated values.

but calculating Age in a form or in a query wont matter.
The Age will still not be stored. simply calculated to show up when the form is open and displaying a students record.

but how else can i calculate the statistics that i need ???

the code im using to get these stats only works for table data that is stored.
i am trying to figure out how to use this calculated field to generate statistics.
but i dont know.

but i DO know not to store Age.
 

Users who are viewing this thread

Back
Top Bottom