Can query return result in vertically instead of horizontally?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HowHow
    New Member
    • Sep 2007
    • 48

    Can query return result in vertically instead of horizontally?

    Using Access 2000, normally query returns result horizontally. Is there any way to set the query to return result vertically?

    For example, my query shown the result as below:
    [HTML]
    Heading below 70 70-74 75-79 80-84 85 and above
    Value returned 128 54 137 190 294[/HTML]


    Is there any way to show the result as below?

    [PHP]
    Heading Value returned
    Below 70 128
    70-74 54
    75-79 137
    80-84 190
    85 and above 294[/PHP]

    Thank you
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    Short answer to this one is no. What you are seeking is a kind of inverse pivot where the field names become the left-most row elements, and the field values (the query rows) become the remaining elements on each row. Can't be done directly in Access (at least not without bespoke programming in VBA).

    However, it is straightforward in Excel to achieve the effect you require by setting up two worksheets, one holding the normal tabular view of the data and the other a custom view using cell references referring A2 to table B1, A3 to table C1 and so on.

    -Stewart

    Comment

    • HowHow
      New Member
      • Sep 2007
      • 48

      #3
      I see...thank you for your time :)

      Comment

      Working...