Results 1 to 2 of 2

Thread: Dcount problem

  1. #1
    Join Date
    Apr 2003
    paris, FRANCE

    Question Unanswered: Dcount problem

    Hey y'all,
    I have a table with three fields
    The fields KEY_Tbl1 and KEY_Tbl2 each have numbers in them (1,2,3 for field KEY_Tbl1 and 10,11,12 for field KEY_Tbl2).
    I can count how many 1,2,3,10,11,12 there are in each tables but my real problem is:
    How can I count, using a query or a module for each possible case (9 possible), how many entries have:
    - KEY_Tbl1=1 and KEY_Tbl2=10 or
    - KEY_Tbl1=1 and KEY_Tbl2=11 or
    - KEY_Tbl1=1 and KEY_Tbl2=12 or
    - KEY_Tbl1=2 and KEY_Tbl2=10 or
    - KEY_Tbl1=3 and KEY_Tbl2=12

    ????? Can some one help me?
    As no one stops raising the level of difficulty (for my knowledge I am at a limit close to infinite on this one!!!), if that person knows how I can get rid of the field value (1,2,3,10,11,12 ) and have this query count for me the number of times
    KEY_Tbl1=" any value" and KEY_Tbl2="another value"
    Giving as an output the values of KEY_Tbl1 and KEY_Tbl2 and the number of times they are found on the same line in my table...

    Thx for your help

  2. #2
    Join Date
    Jun 2003
    Provided Answers: 1
    You have two choices:

    A crosstab query where Key_Table1 values are the rows, Key_Table2 values are the columns, and count(KEY) is the value


    A summation query where you calculate count(KEY) grouped by Ket_Table1 and Key_Table2.

    You can do multiple groupings in a summation query, and you can have multiple row fields in a crosstab. You can't have multiple colum or value fields in a crosstab.


Posting Permissions

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