Forum Discussion
Crosstab Query - display more than 1 year
- Mar 13, 2022
on Query1, you add the field you want to Sum().
see the code on the Load event of the form.
the crosstab will display 2 years (starting year is this year).
you can adjust it as to How many years you like, but remember that
the query can only output maximum of 255 columns.
- Tony2021Mar 12, 2022Iron Contributor
Hi Arnel, I am copying over to my db and have a follow up. When you have a sec, how could I also add as value the [AmountOfChange] so basically the display is with dates along the header but then within the data it shows the value of the [AmountOfChange]. I dont think I made that clear in my initial question. Simply put I need to show the value of [AmountOfChange] instead of the count. I hope that makes sense. Let me know if any other questions. thank you very much.
- arnel_gpMar 13, 2022Iron Contributor
on Query1, you add the field you want to Sum().
- Tony2021Mar 13, 2022Iron ContributorI see. I didnt notice you attached a sample. I was checking from my phone. I actually did it myself. It was a little tricky since I could not modify the queryz. I was adding other ID's and such and once I ran the form it removed what I added. I did same as I did in query1 as I did in queryz and that worked. i am good now. Looks really nice. thanks again for the help. Have a good night!