![]() |
| |||||||
| Sponsored Links |
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
|
#11
| ||||
| ||||
| ok, i used the solution from Mehere to get my category totals but i've been trying to get this data at the bottom but with no success so now I'd like to put these category totals into another table at the top of the screen. I've created a table but it only lists the first category name and the total is not correct. Is there a way to use the same recordset and loop thru the records to get the category(s) and their total(s) in one table then go on to display the detail data (category, group, item, cost, etc) in another table? ex: right now it looks like this CategoryName1-GroupName1 --Item1-----Cost --Item2-----Cost -GroupName2 --Item3-----Cost --Item4-----Cost CategoryName1 Total--CategoryCost CategoryName2-GroupName3 --Item5-----Cost -GroupName4 --Item6-----Cost CategoryName2 Total--CategoryCost GrandTotal---------GrandTotalCost Would like to make another table at the top of the screen to display like: first table layout CategoryName1 Total--CategoryCost CategoryName2 Total--CategoryCost ETC GrandTotal---------GrandTotalCost then second table layout CategoryName1-GroupName1 --Item1-----Cost --Item2-----Cost -GroupName2 --Item3-----Cost --Item4-----Cost CategoryName1 Total--CategoryCost CategoryName2-GroupName3 --Item5-----Cost -GroupName4 --Item6-----Cost CategoryName2 Total--CategoryCost etc CategoryName1 Total--CategoryCost CategoryName2 Total--CategoryCost GrandTotal---------GrandTotalCost |
| Sponsored Links |
|
#12
| ||||
| ||||
| you can still use part of the other code (the part that does the total) for the top table ... to get the grand total ... you need to add another variable that keeps adding up all the values. once that's done, use the rs.MoveFirst (will take you back to the beginning of the recordset) and start the second table.
__________________ Quote of the Month: Regret: It hurts to admit when you make mistakes - but when they're big enough, the pain only lasts a second. Questions to Ponder: Could it be that all those trick-or-treaters wearing sheets aren’t going as ghosts but as mattresses? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright © 2008 sbenj69 |
| The Following User Says Thank You to mehere For This Useful Post: | ||
Rebelle (June 5th, 2008) | ||
|
#13
| ||||
| ||||
| Quote:
I'm still a newbie, so i never had to use rs.movefirst but now i know. Cheers! Gonna see if this will work for my second table (bottom category totals). You're the best!!!heck ya!!! it worked for the bottom too! so awesome! Last edited by Rebelle; June 5th, 2008 at 11:56 AM. |
|
#14
| ||||
| ||||
| np ... glad it worked for you |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|