Results 1 to 7 of 7

Thread: Coding (2000)

  1. #1
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Coding (2000)

    Hello, have a query that has an option value from one field say "business" returning 1 and 2 and a further option "Question" returning values 1,2 and 3. I need to return a summary that counts how many instances of "question" there are where the value is 3 and to count "business" where value is 1 and "business" where value is 2. Is this possible?

    Thanks Darren.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Coding (2000)

    You write

    > to count "business" where value is 1 and "business" where value is 2

    Do you mean two separate counts? And should this be separate from the count for "question"?

  3. #3
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Coding (2000)

    Yes Hans, two seperate counts. Sorry for ambiguity.

    darren.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Coding (2000)

    Does this do what you want?
    - Create a query based on your table/existing query.
    - Select View | Totals.
    - Add the Business and Question fields.
    - Set the Total option for Question to Where and enter 3 in the Criteria row for this field.
    - Add a calculated column with the expression below and set its Total option to Expression

    Cnt: Count(*)

  5. #5
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Coding (2000)

    Thanks Hans, I have re read and sorry but I didn't make my self clear. I need a count for business where value is 1, a seperate count for business where value is 2 and a third count for question where value is 3. Many thanks again.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Coding (2000)

    In that case, you should either use DCount expressions, or create three separate Totals queries. What you want, cannot be done in a regular Totals query.

  7. #7
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Coding (2000)

    That's good Hans, thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •