Microsoft Access Forums

Go Back   Microsoft Access Forums > Access Forums > Queries

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 03-08-2010, 04:16 AM
aajay05 aajay05 is offline Windows 2K Access 2000 (version 9.0)
Novice
 
Join Date: Mar 2010
Posts: 2
aajay05 is on a distinguished road
Default Multiple count query

I am trying to create a report that shows the number of records in age groups. I am currently using count queries to to determine the age groups and amount of records in the age group. From there I am making a report that shows the amount of records in the age group. My goal though, is to put all of the age groups and counts on one query, so that I don't have to use sub reports and simplify my data. Is there any way that I can put the age groups and counts on one query? Thanks
Reply With Quote
  #2  
Old 03-08-2010, 06:58 AM
ajetrumpet ajetrumpet is offline Windows Vista Access 2007 (version 12.0)
Advanced Beginner
 
Join Date: Mar 2010
Location: iowa city, ia
Posts: 83
ajetrumpet is on a distinguished road
Send a message via MSN to ajetrumpet Send a message via Yahoo to ajetrumpet
Default

in my view the best way to do this would be:

*one table for age groups: 3 fields - groupID, lowage, highage
*one table for the people that have ages

then the population of the agegroup when you enter a number for an age with new records in your 'people' table will be simple. and as a result, you can query like:

Code:
select distinct agegroupcount(*) as [numrecords]

 
from ''people table''

group by agegroup
Reply With Quote
  #3  
Old 03-08-2010, 07:00 AM
aajay05 aajay05 is offline Windows 2K Access 2000 (version 9.0)
Novice
 
Join Date: Mar 2010
Posts: 2
aajay05 is on a distinguished road
Default

Yes. I looked up a few options and I thought the same thing. Thanks
Reply With Quote
Reply

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count function on query yousillygoose Queries 1 02-15-2010 06:58 PM
Running Count Query monkey2003 Queries 0 09-21-2009 10:24 AM
using COUNT for multiple tables kwalt Programming 1 02-17-2009 01:05 PM
using COUNT for multiple tables kwalt Queries 0 02-17-2009 12:06 PM
Result of Count Query not known elsewhere Carole Access 1 09-07-2008 07:39 AM


All times are GMT -8. The time now is 08:25 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.