Is it possible to create a recursive sum in ms access by sql query or vba

Wow, Mr. @arnelgp , a wonderful job in a crazy way, this is just what I was dreaming about. Thank you very very much, you are a genius.
I thank everyone for their interest, and a special thanks to Mr. @MajP . I also took advantage of the code that You designed for other things, and thank you for this really wonderful website.
 
I won't suggest any code, but I will stress that having a table of accounts that is not built in a logical hierarchical way is giving you this problem.
You shouldn't need recursion for this. Any account in the same ledger section as, say account "12", should start "12", and then you avoid all these issues, with both vertical and horizontal reports. Then you don't need the table you showed us in the first place.

What you are doing is equivalent to having a subfolder of a folder "ABC" in a completely different part of the disk, but still trying to show it as a subfolder of "ABC"
 
My friend @gemma-the-husky , I did not understand what you mean, but in the end this is an example that I set for you and it is not an actual account tree, but this was just a quick example of the amount of data I have
 

Users who are viewing this thread

Back
Top Bottom