A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Ages Query



 
 
Thread Tools Display Modes
  #1  
Old February 15th, 2005, 03:48 PM
dukes1234
external usenet poster
 
Posts: n/a
Default 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  
Old February 15th, 2005, 04:11 PM
Rick B
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 09:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.