J
jake
my database has 4 reports that I need to calculate the age of a person.
I now use:
Public Function Age()
If Month([DeathDate]) < Month([Birthdate]) Or _
(Month([DeathDate]) = Month([Birthdate]) And Day([DeathDate]) <
Day([Birthdate])) Then
Age = Year([DeathDate]) - Year([Birthdate]) - 1
Else
Age = Year([DeathDate]) - Year([Birthdate])
End If
End Function
in each report. My qestion, should i use the above code in each report
or is there a more effecient way?
Thanks,
Jake
I now use:
Public Function Age()
If Month([DeathDate]) < Month([Birthdate]) Or _
(Month([DeathDate]) = Month([Birthdate]) And Day([DeathDate]) <
Day([Birthdate])) Then
Age = Year([DeathDate]) - Year([Birthdate]) - 1
Else
Age = Year([DeathDate]) - Year([Birthdate])
End If
End Function
in each report. My qestion, should i use the above code in each report
or is there a more effecient way?
Thanks,
Jake