Results 1 to 3 of 3
  1. #1
    svobfamily is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Feb 2017
    Posts
    3

    DOB Calc

    I have a table with a DOB and need to have a column to reflect that persons age as of Jan 1 of current year. From there I need another column to categorize that age into a level of jr, intermediate or senior for that participant. So participant Joe's DOB is 1/10/2006 and so as of Jan 1 2017 they were 10 so are in the jr division. Any help appreciated!!

  2. #2
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    you shouldnt store this data in a column. The accuracy of the data is only correct for one year. Then after that year your database is full of incorrect data. Instead.... have this calculated on the form level. So its correct data at the time of the query running on the form.

    the query for the form should calculate the age. then you may have another query based on this query that will split the rusults how you want them based on age.

  3. #3
    svobfamily is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Feb 2017
    Posts
    3
    ok, i think i figured it out myself ~ my table will be imported each year with new participants,,,,,name, dob and gender. I will pull that into a query with one column of current year c_yr to pull Jan 1 of the current year

    c_yr: DateSerial(Year(Date()),1,1)

    Then another column to calc the age of the participant (c_age) based on c_yr
    c_age: DateDiff("yyyy",[DOB],[c_yr])+Int(Format([c_yr],"mmdd")<Format([DOB],"mmdd"))

    I was hoping to do this in one column ~ but 2 works too.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Cummulative Calc
    By mike02 in forum Queries
    Replies: 3
    Last Post: 06-11-2013, 09:51 AM
  2. Age calc wrong.
    By TOMMY.MYERS668 in forum Programming
    Replies: 16
    Last Post: 03-02-2013, 09:01 AM
  3. Calc
    By hitman in forum Access
    Replies: 2
    Last Post: 02-14-2013, 07:10 AM
  4. calc field
    By nashr1928 in forum Forms
    Replies: 8
    Last Post: 11-09-2011, 09:21 PM
  5. Calc fields
    By nashr1928 in forum Forms
    Replies: 5
    Last Post: 02-26-2011, 08:35 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums