Using Code



Hi all,

I must admit, all I do in Access is puddle around. But I have been
searching for how I can correctly show age in a database I am making,
and have discovered, as Allen Browne says,
"These examples do not work reliably:
Format(Date() - DOB, "yyyy")
DateDiff("y", DOB, Date)
Int(DateDiff("d", DOB, Date)/365.25)"

And there is the code there ready to use, for the accurate version. So
here's my question....where do I put the code???
I know, a little knowledge is a dangerous thing!
Thanks in anticipation!

.



Relevant Pages

  • Re: Calculating age on a specific date
    ... be on 3/19/2011 (using their DOB) ... which gives me the age of the person on the date I open the database. ... the Modification Field to be the new RaceDate Field. ...
    (comp.databases.filemaker)
  • Re: Missing Data
    ... The expression worked....The database I created is for a study that requires ... age not DOB and we are just looking at a single time point not over time. ... I was not aware that HIPPA considered DOB restricted info. ... Date of Birth is an identifier that is sometimes ...
    (microsoft.public.access.queries)
  • Calculating age on a specific date
    ... In my database for a 10K Run I need to calculate the age a runner will ... be on 3/19/2011 (using their DOB) ...
    (comp.databases.filemaker)
  • Re: A date function in Access using VB
    ... Dim currentSeason As Date ... ' put the age on the form ... Doug Steele, Microsoft Access MVP ... DOB and the playingAge are bound to a database. ...
    (microsoft.public.access.formscoding)
  • Re: index card
    ... My excel spreadsheet is the equivalent of index cards - I list each person - ... their parents, spouse, occupation, dob, dom, dod, locations for each and age ...
    (soc.genealogy.britain)