Access 2010 Table Field Calculations

BenjaL01

New member
Local time
Today, 17:18
Joined
Jan 28, 2013
Messages
1
I am of the understanding that in Access 2010 field values can be calculated.

Suppose I have the following field(s):
1. Person Name - Full_Name
2. Person's Date of Birth - DoB
3. Current Age - Derived

[OBJECTIVE]
- I would wish to have the db have an extra field calculate a value, say each time the database is opened (i.e.: refresh) so that it is up-to-date each time.
- Age should allow display or store in decimal format

When I set my fields I have problems, and cannot calculate
Field Formula = Now() - [DoB]
Now() seems not to work in Access.

[Questions]
- How do I go about this?
- What is the function I can store in the Expression Builder that will allow re-calculating of the same?
- How do I ensure refreshes are done for including existing derived data?

NB: I am not considering use of Views as I wish to work with Tables only.

Thanks in advance and I will appreciate your assistance and answer into detail to ease understanding.

Leslie Benjamin
 
Hi

Hi Leslie

There's a widely accepted wisdom that says you shouldn't ever put calculated fields into a table ... rather you should always use a Query to calculate the value when it's required and then paste the result into the table.

In this instance it sounds like you should run a Query at Startup that recalculates all ages and updates each record in the table with the precise age.
 

Users who are viewing this thread

Back
Top Bottom