Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2009

    Unanswered: Need to assign members an age group based on DOB

    Ok guys I need to make a relational database for homework but I'm a bit stuck with this one bit.
    So this is a basic outline of what I want the database to do.
    There is a form that I have made up that you enter the data of the groups members into. That form then fills out the table called "members".
    There is another form that fills out the participation of the members in certain events.
    The events are 'swimming', 'athletics' and 'orienteering' which each have a number value relating to how many hours they have done and 'communityservice' which is a yes/no value as to which they have done it or not.
    There will be queries that will bring up which members have fulfilled the goal that allows them to be awarded an 'award' which is just a certificate I have to design.
    Now most of that is quite basic and I can do, the hard part that I don't know how to do is this.
    Amongst the data that gets entered for the members is a DOB. Now there are three age groups 'junior'(7-9 years), 'intermediate'(10-13 years) and 'senior'(14-16 years) which will be on another table called "Agegroups".
    I need a way that the database can look at a members DOB and determine their age and then slot the member into the age group appropriate for that age.

    How is this possible?
    Please tell me it is.

    Huge kudos to whoever helps me :-)

  2. #2
    Join Date
    Nov 2007
    Adelaide, South Australia
    Yes, it's possible.

    Have you asked your teacher?

    Here's a basic (not 100% accurate way of caclulating age based on DOB:

    Age: (Date() - DOB) / 365.25

    I'm sure others will point out that this expression is not quite accurate, but I use it without anyone complaining and have done so for years.

    Once you have the structure for your Agegroups table, let us know what it is and we can point you in the right direction, but no-one is going to do your homework for you,... well SindHo might cause he's a machine!
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Apr 2009
    Ha, I don't want anyone to DO my homeowrk for me, just need a hand figuring out the theroty behind it so I can try and apply it.
    So where do I put the formula and how do I link the age to the groups?

    At the moment I have two tables.
    Members which has:


    Activities which is blank but will have the groups junior, intermediate and senior.

    So where do I put the forumla to make the ages?

  4. #4
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    so you need to know the age of the individual
    you need to know the age bands of each category of membership
    when you create a member you need to find the appropriate membership group
    so thats looking for a membership band whose lower age group is = or before the members age AND whose upper age group is <= the members age. essentially thats writing a query to find the appropriate membership category

    you need a form/process which reviews the membership bands of all members and reallocates as required

    I'd suggest you do it as a function which returns the current membership category for a member. then you can fullfil both requirements in one function

    I'd suggest you do the age calc as a function (StarTrekkers approach is fine, eminently practical but may raise eyebrows with lecturers/teachers).
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts