Forum Discussion
Tony2021
Mar 09, 2022Steel Contributor
Crosstab Query - display more than 1 year
hello, I have a crosstab query I made with the wizard. It looks good but I want a year to be appended to the month. I tried to adjust the format from the current DateAmendSentToBank],"mmm" to Date...
- Mar 13, 2022
on Query1, you add the field you want to Sum().
Tony2021
Mar 11, 2022Steel Contributor
HI Arnel, thank you very much. I do have a question though. Does the output include more than 1 year? I added a few records in the table in 2022 and 2023 and I refreshed the form but I only see records for one of the years. if I had to choose a limit I would say 2 years if that helps. thank you. Looking forward to your response.
arnel_gp
Mar 11, 2022Steel Contributor
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, 2022Steel 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, 2022Steel Contributor
on Query1, you add the field you want to Sum().
- Tony2021Mar 13, 2022Steel 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!