dates birth
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access Training and help » Dates of Birth

Dates of Birth

resolvedResolved · Medium Priority · Version 7

replyReply Fri 28 Aug 2009, 15:37Delegate Sheila said...

Sheila has attended:
Access Intermediate course

Dates of Birth

We have got details of people's dates of birth but would like Access to tell us their ages automatically.

For upcoming training course dates see: Pricing & availability

replyReply Fri 4 Sep 2009, 09:23Trainer Andrew said...

RE: Dates of Birth

Hi Sheila - apologies for the delay. I have a couple of suggestions for a calculated field in a query. Should have them online by end of today.

Kind regards,
Andrew

replyReply Fri 4 Sep 2009, 16:46Trainer Andrew said...

RE: Dates of Birth

Hi Shirley

Make a query based on the table containing the DOB field. Create a custom field in the query by adding the following to the field row:

Age: DateDiff("yyyy",[DOB],Now())+Int(Format(Now(),"mmdd")<Format([DOB],"mmdd"))

This uses the datediff function to work out the difference between your DOB field and today's date. You should find your query now has a new column called Age with the calculated value.

There are several ways of approaching this but this might just do the trick. Give it a try and see if the results work with your data.
Kind regards,
Andrew

Fri 11 Sep 2009: Automatically marked as resolved.

 

Please browse our web site to find out more about
training database microsoft access and other Microsoft training courses.

Access tip:

Using the Quick Access Toolbar in Access 2010

The Quick Access Toolbar is included in virtually every Office product, including Outlook 2010, Word 2010, Excel 2010, and PowerPoint 2010.

You will find the Quick Access Toolbar in the top-left side of the window. To begin, click the Customize button (it's the little black arrow at the end of the toolbar).

Simply click the commands you want to include.

Virtually any command can be added to the Quick Access Toolbar. Click the More Commands option and a new window will open from where you can browse the commands including those not on the ribbon.

View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard