Results 1 to 3 of 3
  1. #1
    foxtet is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    23

    Lightbulb Put person's age in a report


    Hi,
    I have trouble putting a person's age in years in a report..
    can anyone tell me how to put it on the report.

    I have a table called PersonInfo, in that table there is BirthDate feild based on the BirthDate entry on that feild i need to calculate age of person on the report for the current date (system Date)

    any help is appreciated.

    Fox

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,963
    DateDiff("yyyy",[BirthDate],Date())

    This will round to the year. Birthdate in current year will be age 0.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    This is what I use for age:
    DateDiff("yyyy", [DateofBirth], Date())+ Int( Format(Date(), "mmdd") < Format( [DateofBirth], "mmdd") )

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

Similar Threads

  1. Replies: 1
    Last Post: 01-28-2011, 06:58 AM
  2. Replies: 21
    Last Post: 11-21-2010, 12:01 PM
  3. Combined "person" field on form
    By Remster in forum Forms
    Replies: 14
    Last Post: 09-15-2010, 10:44 AM
  4. Replies: 2
    Last Post: 08-25-2010, 01:42 PM
  5. New person here AND with Access
    By Coytee in forum Access
    Replies: 8
    Last Post: 03-08-2010, 01:36 PM

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