Results 1 to 3 of 3
  1. #1
    rscott7706 is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2009
    Location
    Lakeside Ca
    Posts
    24

    Cool Trouble with count query based on person's age entries, count of people from 1966, 1967, 1968, etc.

    I searched the queries forum, and could not find n answer to my question. I am sure it is there somewhere, but finding it proved difficult.




    I would like to create a query that lists a count of all fields by persons age. I have a table that lists all the ages of high school graduated classmates.


    Sample (Count would be the result of the query):


    Age Count
    90 10
    89 16
    87 20

    I tried to do a count query, but get wonky results. Here are two screen dumps (one works, the other does not):
    Click image for larger version. 

Name:	query1.png 
Views:	15 
Size:	36.8 KB 
ID:	25079 Click image for larger version. 

Name:	query2.png 
Views:	16 
Size:	32.6 KB 
ID:	25080

    I am somewhat of a "noobie" - love Access, but get little use time these days.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    you need 2 fields in the query
    YEAR, and count(YEAR)

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    you also need to consider that age is not a good metric to store, otherwise next year guess what, you are going to have to go into each record and add 1 to the age. Better to store some other value such as date or year of birth so you can calculate the age

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 05-05-2016, 01:56 PM
  2. Replies: 4
    Last Post: 05-09-2013, 10:44 AM
  3. Replies: 8
    Last Post: 08-16-2012, 09:04 AM
  4. Count Number of People Per Product
    By Lorlai in forum Queries
    Replies: 3
    Last Post: 06-29-2011, 06:15 PM
  5. Query to group and count field entries
    By newtoAccess in forum Queries
    Replies: 4
    Last Post: 11-29-2010, 09:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums