• Summing several Count fields (Access 2003 SR-1)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Summing several Count fields (Access 2003 SR-1)

    Author
    Topic
    #401995

    HISTORY: I sent out an online web survey to all users at all locations of our company, asking which of several training classes they would like to take. They indicated which classes, by checking a box in front of the class. When they hit Submit, the results were dumped into a database (with a YES entry where they checked a box, and a blank where they did not). Now I’m attemping to analyze that information.

    I have created a qry that will do a count of all users who want to take class A or B or C, and I can specify which location by including the “Facility” field. Doing a count query for how many people want to take each class at a single location is easy enough. I can even do searches on multiple locations by specifying ” ‘FacilityA’ OR ‘FacilityB’ ” in the criteria and it will return a count/total for each class at those specific locations. But, I would like to total all results from FacilityA AND FacilityB – and when I type just that in my Facility Criteria I get bubkus – I guess because it is looking for instances where someone from FacilitiesA and B selected a course, and that will not exist because user’s only work in one place or another. Can anyone help me get my syntax right? Better yet, can anyone understand what I’m trying to do ?!?! bananas

    Viewing 3 reply threads
    Author
    Replies
    • #796765

      I’ll bite. No, I don’t understand what you are trying to do. What do you mean by “someone from Facilities A and B”?

      • #796775

        I’m with Hans — not sure I understand completely either — but have you tried to analyze the results with a Crosstab Query? Sounds like that would help, especially if you include totals.

        Kathi

      • #796776

        I’m with Hans — not sure I understand completely either — but have you tried to analyze the results with a Crosstab Query? Sounds like that would help, especially if you include totals.

        Kathi

      • #796779

        Hey Hans – thanks for responding, even though you didn’t understand. I was going to attach an abbreviated copy of the database, but for some reason even my copy is 2mb. Oh well. For the time being, I’ve created a workaround by exporting the information into Excel, and just doing an AutoSum on all the count fields to sum up how many users from each of the listed facilities are interested in a certain class. I CAN attach that, if it will give you any better idea of what I needed. If not, don’t sweat it since I found a semi solution. Thanks again!

      • #796780

        Hey Hans – thanks for responding, even though you didn’t understand. I was going to attach an abbreviated copy of the database, but for some reason even my copy is 2mb. Oh well. For the time being, I’ve created a workaround by exporting the information into Excel, and just doing an AutoSum on all the count fields to sum up how many users from each of the listed facilities are interested in a certain class. I CAN attach that, if it will give you any better idea of what I needed. If not, don’t sweat it since I found a semi solution. Thanks again!

    • #796766

      I’ll bite. No, I don’t understand what you are trying to do. What do you mean by “someone from Facilities A and B”?

    • #796799

      An easier way to do this instead of using the yes / no field that generates a -1 for yes or 0 for no and requires you to use the count function is to use a numeric field. Put a 1 for yes and 0 for no for the class data. Then you could simply generate a query that gets courses A, B, C, etc., and each location, turn on the grouping feature, and sum on each of the class fields while grouping on location. This is much easier then using the count feature.

      HTH (And that I actually made some sense)

      • #796815

        I believe you can also SUM the yes/no field based on selection criteria to accomplish the same thing:

        something like “ABS(SUM(myYesNo))” where :myYesNo” is the field/control storing their response.

        HTH

      • #796816

        I believe you can also SUM the yes/no field based on selection criteria to accomplish the same thing:

        something like “ABS(SUM(myYesNo))” where :myYesNo” is the field/control storing their response.

        HTH

    • #796800

      An easier way to do this instead of using the yes / no field that generates a -1 for yes or 0 for no and requires you to use the count function is to use a numeric field. Put a 1 for yes and 0 for no for the class data. Then you could simply generate a query that gets courses A, B, C, etc., and each location, turn on the grouping feature, and sum on each of the class fields while grouping on location. This is much easier then using the count feature.

      HTH (And that I actually made some sense)

    Viewing 3 reply threads
    Reply To: Summing several Count fields (Access 2003 SR-1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: