Michael,
I disagree with your characterization of dateadd("yyyy",-30,date()) as vague or not accounting properly for the age. Note the results from Access 2000. Looks very precise to me.
?dateadd("yyyy",-30,#9/10/2001#)
9/10/71
?dateadd("yyyy",-30,date())
9/11/71
DOB=#9/11/71#:?DOB <= dateadd("yyyy",-30,date())
True
DOB=#9/12/71#:?DOB <= dateadd("yyyy",-30,date())
False
And Joe's function works properly, also.
DOB=#9/11/71#:?IIf(IsNull(DOB),0,DateDiff("yyyy",DOB,Date())+(DateSerial(Year(Date()),Month(DOB),Day(DOB))>Date()))
30
DOB=#9/12/71#:?IIf(IsNull(DOB),0,DateDiff("yyyy",DOB,Date())+(DateSerial(Year(Date()),Month(DOB),Day(DOB))>Date()))
29
Can you provide evidence to the contrary? Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums. NOTE: Reference to the FAQ is not directed at any individual.