Currentage
  Home FAQ Contact Sign in
 
Advanced search
MATCHING GROUPS



more...
POPULAR GROUPS

more...

found 26 articles for 0.073 sec
The main advantage of using a function is that it is easy to call from many different places. And once you have the function set up you don't have to remember how to calculate age each time you need to do so. Also, if you make a calculation mistake in the function it is easier to fix the mistake in one place rather than checking it every place you may have used it. And you can add an     

Group: microsoft.public.access.gettingstarted · Group Profile · Search for Currentage in microsoft.public.access.gettingstarted
Author: John Spencer
Date: Sep 13, 2008 07:18

Thanks John, As I'm still learning Access, and especially trying to learn the "big picture" (good practices and why to use one method over another), could you please tell me why you'd choose the VBA function over putting a normal Access expression inside the unbound text control? Off the top of my (admittedly ignorant) head, the only advantage I can see would be to make it perhaps a little
Show full article (3.08Kb) · Show article thread
I would probably create a little VBA function to calculate age. Public Function fAge(dtmDOB, Optional dtmDate) 'Returns the Age in years, for dtmDOB. 'Age calculated as of dtmDate, or as of today if dtmDate is missing. If Not IsDate(dtmDate) Then dtmDate = Date 'If as of date not passed then set to today's date If IsDate(dtmDOB) Then 'If date passed, then calculate age     

Group: microsoft.public.access.gettingstarted · Group Profile · Search for Currentage in microsoft.public.access.gettingstarted
Author: Chuck Smith
Date: Sep 12, 2008 16:31

Received: from [72.66.229.69] by openbrick.kicks-ass.net (ArGoSoft Mail Server Pro for WinNT/2000/XP, Version 1.8 (1.8.6.0)); Sat, 9 Feb 2008 19:35:22 -0500 Return-Path: <jracine@usxpress.com> Received: from 209.215.149.65 (HELO navgw.usxpress.com) by openbrick.kicks-ass.net with esmtp (KNBZVNVQRBTC LAOLY) id bzmB5S-LFpysQ-i for [spamtrap]; Sat, 09 Feb 2008 19:35:25 -0500 Message
Show full article (1.97Kb) · Show article thread
Jasmine, I strongly discourage storing the [Age] in a field. Since this value changes quite frequently (for at least some portion of your client base), it is much smarter to compute this value on the fly. There are several techniques for this, but I liked the one that James Fortune posted a couple of days ago CurrentAge = Int(Format(Date(), "yyyy.mmdd") - Format([DOB], "yyyy.mmdd")     

Group: microsoft.public.access.gettingstarted · Group Profile · Search for Currentage in microsoft.public.access.gettingstarted
Author: John Spencer
Date: Sep 11, 2008 07:06

Jasmine, I strongly discourage storing the [Age] in a field. Since this value changes quite frequently (for at least some portion of your client base), it is much smarter to compute this value on the fly. There are several techniques for this, but I liked the one that James Fortune posted a couple of days ago CurrentAge = Int(Format(Date(), "yyyy.mmdd") - Format([DOB], "yyyy.mmdd")
Show full article (2.85Kb) · Show article thread
Jasmine, I strongly discourage storing the [Age] in a field. Since this value changes quite frequently (for at least some portion of your client base), it is much smarter to compute this value on the fly. There are several techniques for this, but I liked the one that James Fortune posted a couple of days ago CurrentAge = Int(Format(Date(), "yyyy.mmdd") - Format([DOB], "yyyy.mmdd")     

Group: news.admin.netabuse.sightings · Group Profile · Search for Currentage in news.admin.netabuse.sightings
Author: sightings
Date: Feb 9, 2008 16:35

Jasmine, I strongly discourage storing the [Age] in a field. Since this value changes quite frequently (for at least some portion of your client base), it is much smarter to compute this value on the fly. There are several techniques for this, but I liked the one that James Fortune posted a couple of days ago CurrentAge = Int(Format(Date(), "yyyy.mmdd") - Format([DOB], "yyyy.mmdd")
Show full article (3.91Kb)
MaRSMAN wrote: > > "James A. Fortune" wrote: > > >>skrysiak wrote: >> >>>is there any way to calculate age from 2 date fields in years >> >>For the age in years from dt1 to dt2 I use (VBA): >> >>intCurrentAge = Int(Format(dt2, "yyyy.mmdd") - Format(dt1, "yyyy.mmdd")) >> >>In SQL: >> >>SELECT Int(Format(Date(), "yyyy.mmdd") - Format([BirthDate], >>"yyyy.mmdd")) As CurrentAge FROM     

Group: microsoft.public.access.dataaccess.pages · Group Profile · Search for Currentage in microsoft.public.access.dataaccess.pages
Author: Dale Fye
Date: Nov 14, 2007 11:52

"James A. Fortune" wrote: skrysiak wrote: is there any way to calculate age from 2 date fields in years For the age in years from dt1 to dt2 I use (VBA): intCurrentAge = Int(Format(dt2, "yyyy.mmdd") - Format(dt1, "yyyy.mmdd")) In SQL: SELECT Int(Format(Date(), "yyyy.mmdd") - Format([BirthDate], "yyyy.mmdd")) As CurrentAge FROM MyTable WHERE BirthDate IS
Show full article (1.62Kb)
    

Group: microsoft.public.access.gettingstarted · Group Profile · Search for Currentage in microsoft.public.access.gettingstarted
Author: Dale Fye
Date: Nov 14, 2007 11:52

Show full article (1.62Kb)
    

Group: microsoft.public.access.externaldata · Group Profile · Search for Currentage in microsoft.public.access.externaldata
Author: Dale Fye
Date: Nov 14, 2007 11:52

Show full article (1.62Kb)
    

Group: microsoft.public.access.queries · Group Profile · Search for Currentage in microsoft.public.access.queries
Author: Dale Fye
Date: Nov 14, 2007 11:52

Show full article (1.62Kb)
    

Group: microsoft.public.access · Group Profile · Search for Currentage in microsoft.public.access
Author: James A. Fortune
Date: Nov 9, 2007 14:10

Show full article (1.07Kb) · Show article thread
    

Group: microsoft.public.access · Group Profile · Search for Currentage in microsoft.public.access
Author: MaRSMAN
Date: Nov 9, 2007 10:54

Show full article (0.83Kb) · Show article thread
1 · 2 · 3 · next