Note to using the following all you need to is turn your individual date items 
into a single string and make the date1 and then using the Now( ) function 
as date2. 
 
VBA DateDiff Function 
 
The VB DateDiff function returns a variant variable result of subtracting two 
dates.  The unit of measure is defined in the interval argument.  
Syntax

DateDiff(interval, date1, date2[, firstdayofweek[, firstweekofyear]]) 
 
Arguments: 
 
interval - Required. String expression that is the interval of time you use to 
calculate the difference between date1 and date2. See a list of valid intervals 
in the DateAdd function above.

date1, date2 - Required; Variant (Date). Two dates you want to use in the 
calculation.

firstdayofweek - Optional. A constant that specifies the first day of the week. 
If not specified, Sunday is assumed. 

firstweekofyear - Optional. A constant that specifies the first week of the 
year. If not specified, the first week is assumed to be the week in which 
January 1 occurs. 
 
Example: 
 
MsgBox DateDiff("yyyy", "01/01/2005", "11/11/2006") 
 
Above displays '1'.
 
Your specific example assumes your items are numeric
 
strBirthDate = Format(Day_Birth, "00") & "/" & Format(Month_Birth, "00") & "/" 
& cStr(Year_Birth)
 
intAge = DateDiff("yyyy", strBirthDate, Now( ))

--- On Thu, 5/28/09, abdul daulay <[email protected]> wrote:
>
> I want to make a school database, but I don't know how to get a student age. 
> I have
> three field name=Day_Birth, Month_Birth and Year_Birth. Please help me...
>














      

[Non-text portions of this message have been removed]

Reply via email to