IN ACCESS NEED TO INCREASE AGE COLUMN BY A YEAR

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Datebase of horses. Need to increase age column by a year, every year. Any
ideas??
 
You should only store birth date, NOT the age and whenever you need the age,
work it out w.r.t. current date.
 
yvonne said:
Datebase of horses. Need to increase age column by a year, every year.
Any
ideas??

Generally it is a bad idea to store computed values. In this case it is
even worse since the results will change based on another variable.

Access works faster by computing the result when displayed than by
having an additional field.

Using a dynamic computation you can chose to show the age as of a given
date (for example the age as of the first of the current year, or the age as
of the date viewed and you would never need to do an update, it will always
be right as long as the computer has the right date.
 
Datebase of horses. Need to increase age column by a year, every year. Any
ideas??

Just store the birthdate; if the horse gets a year older on January 1,
just use a Query with a calculated field

DateDiff("yyyy", [Birthdate], Date())

to calculate it on the fly.

John W. Vinson[MVP]
(no longer chatting for now)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top