Criteria for age calculation

D

Deeds37

I have a simple query Name and Date of Birth. I want to calculate the age in
a query. I have tried different criteria from MS Access Tutorials. Can
someone please help me with a correct criteria to calculate the contacts age
as of today from the date of birth.

Thanks,

Deeds37
 
G

Gina Whipp

Deeds37,

Without seeing what you tried... can you tell me why the below didn't work
for you?

=DateDiff("yyyy", [YourBirthDateField], Now())+ Int( Format(Now(), "mmdd") <
Format( [YourBirthDateField], "mmdd") )


--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

I have a simple query Name and Date of Birth. I want to calculate the age in
a query. I have tried different criteria from MS Access Tutorials. Can
someone please help me with a correct criteria to calculate the contacts age
as of today from the date of birth.

Thanks,

Deeds37
 
D

Deeds37

Thanks Gina,
I put this formula in a text box in a form and it works. What I am looking
for is when I write a simple query - Name, Date of Birth........I want it to
calculate the age. Do I put this formula in criteria under date of birth?
 
S

salvatore agostino

Deeds37 said:
I have a simple query Name and Date of Birth. I want to calculate the age
in
a query. I have tried different criteria from MS Access Tutorials. Can
someone please help me with a correct criteria to calculate the contacts
age
as of today from the date of birth.

Thanks,

Deeds37
 
G

Gina Whipp

Deeds37,

Post the SQL of your query here... it should work in a query.

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

Thanks Gina,
I put this formula in a text box in a form and it works. What I am looking
for is when I write a simple query - Name, Date of Birth........I want it to
calculate the age. Do I put this formula in criteria under date of birth?
 
J

John W. Vinson

Thanks Gina,
I put this formula in a text box in a form and it works. What I am looking
for is when I write a simple query - Name, Date of Birth........I want it to
calculate the age. Do I put this formula in criteria under date of birth?

No: put it in a vacant Field cell in the query grid. Putting it under the date
of birth will give you a "criterion" which will end up selecting no records at
all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Age 9
Displaying a calculated value 2
How do you round a number DOWN (for age)? 2
Data Mismatch in Excel 2010 4
Age formula and length of time 1
Age Calculation 8
Age Calculation - Error 1
Age at Case closure 6

Top