Results 1 to 6 of 6
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Summing output rows in a crosstab query (2000)

    Is there a way to make the Query8 crosstab query in the attached mdb sum all the values for each field so as to get the result displaying only one row and not 314 rows?

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Summing output rows in a crosstab query (2000)

    You're grouping by specific values. The only way I see to get totals is with a totals query based on Query8
    Charlotte

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Summing output rows in a crosstab query (2000)

    Hi Charlotte,
    I have hidden the Energia field in Query8 but that doesn't seem to be enough to get a single-row output.
    How come if I add references to the MSeleData form in the Where clause of Query8 as you can see done in Query8x, I get the message: "The Microsoft Jet database engine does not recognize 'forms!mseledata!anno' as a valid field name or expression."
    I've done the same in the QueryFermi query without any problems.

  4. #4
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Summing output rows in a crosstab query (2000)

    I've solved the reference problem by specifying the Column Headings property explicitly in the crosstab query:
    PIVOT Month([giorno]) In (1,2,3,4,5,6,7,8,9,10,11,12)

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Summing output rows in a crosstab query (2000)

    Did you specify the form reference in the query's parameters? That is a must in crosstab queries.
    Charlotte

  6. #6
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Summing output rows in a crosstab query (2000)

    No I didn't, I didn't know that and that's an alternative way to get the query to work without explicitly specifying the Column Headings property.
    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15> <img src=/S/rose.gif border=0 alt=rose width=15 height=15>

Posting Permissions

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