If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Ages Query
I'm trying to find the number of infant participants aged 0 to 11 months
and 12 to 23 months within my database in 2004. For 0 to 11 I just put in "Between 1/1/2004 and 12/31/2004" in the birthdate criteria to account for the children born in that year. How would I run a query for the kids in the 12 to 23 months range? |
#2
|
|||
|
|||
You should rethink this. What happens next month? What about tomorrow?
You need to make it dynamic. Look at datediff and come up with a formula that will subtract the current date from the birthdate and return the number of months. Then, in your criteria put something like, "between 0 and 11 OR Between 12 and 23" Rick B "dukes1234" wrote in message lkaboutsoftware.com... I'm trying to find the number of infant participants aged 0 to 11 months and 12 to 23 months within my database in 2004. For 0 to 11 I just put in "Between 1/1/2004 and 12/31/2004" in the birthdate criteria to account for the children born in that year. How would I run a query for the kids in the 12 to 23 months range? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Nested in-line Query | laura | Running & Setting Up Queries | 0 | February 11th, 2005 12:17 AM |
AVG Function in a Query | JohnL | Running & Setting Up Queries | 5 | December 18th, 2004 05:52 AM |
Return repeats info in "8s" | Joy Rose | Running & Setting Up Queries | 14 | October 13th, 2004 10:07 PM |
Big number gives error! | Sara Mellen | Running & Setting Up Queries | 8 | October 11th, 2004 02:48 AM |
Display Parameter from Form on Report | sara | Setting Up & Running Reports | 10 | July 19th, 2004 04:54 PM |