Results 1 to 2 of 2
  1. #1
    kfox is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    2

    Extract, count and report from multiple queries

    I have set up a table for statistical information of students from our 8 campuses (campus, student first name last name, dob, parent info, grade, etc.). I have a query set-up for each campus.


    I also have an excel spreadsheet when a student enrolls I change the number of students from each campus that are in grades 1-3, 4-6, 7-8 and 9-12.

    Since I have already entered this information into my Access DB, I am wondering why do double-duty (thereby risking my forgetfulness) when I should be able to extract that information from these queries? Not sure how to do this in this grouping, per campus, giving a total count for each campus. Any help would be appreciated.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Why are you maintaining the excel spreadsheet at all, why not just have a form or report that shows the information when you need it? I may be misunderstanding but it seems like you want to export that information to excel which I don't see a reason for based on your requirements.

    Yes you can do what you want

    What you want is a summation query let's say you have the table


    Code:
    tblStudents
    StudentID  CampusID, Grade
    Where StudentID is an autonumber PK
    CampusID is a number (foreign key to your campus list table that has an autonumber PK as well)
    Grade is a number value of the grade the child is in this year

    this would be your query

    Code:
    SELECT tblStudents.CampusID, IIf([grade] Between 1 And 3,"1-3",IIf([grade] Between 4 And 6,"4-6",IIf([grade] Between 7 And 8,"7 -8",IIf([grade] Between 9 And 12,"9 - 12","XX")))) AS GradeLabel, Count(tblStudents.StudentID) AS [Student Count]
    FROM tblStudents
    GROUP BY tblStudents.CampusID, IIf([grade] Between 1 And 3,"1-3",IIf([grade] Between 4 And 6,"4-6",IIf([grade] Between 7 And 8,"7 -8",IIf([grade] Between 9 And 12,"9 - 12","XX"))));
    Make a dummy table and look at how it's constructed then you can adapt it to your situation.

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

Similar Threads

  1. Multiple Queries on One Report (Not a dupe)
    By tmaxxcar in forum Reports
    Replies: 4
    Last Post: 04-02-2013, 07:15 PM
  2. Filtering on multiple tables/queries then extract to csv
    By GraemeG in forum Import/Export Data
    Replies: 7
    Last Post: 10-18-2012, 03:34 PM
  3. Multiple Queries into one report.
    By Ray67 in forum Reports
    Replies: 3
    Last Post: 04-24-2012, 11:22 AM
  4. Use 1 report for multiple queries?
    By Rosier75 in forum Reports
    Replies: 4
    Last Post: 10-22-2011, 07:57 AM
  5. Replies: 1
    Last Post: 06-29-2010, 03:40 AM

Tags for this Thread

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