View Full Version : Sum function only adding first record of each group
jjjason 03-08-2008, 03:20 AM Hi Guys, sorry to bother you but I'm really stumped. I've looked through some similar sounding old posts on here but they don't seem to answer my problem...
I've got a report, which is grouped, in the footer of each group a SUM label should add the contents of the pricce column, however strangely it only adds the first record of each group as a running total. I've tried both the "Over all" and "Over group" attributes of the running sum property, but they make no difference.
Any help would really save my day. Cheers!
Brianwarnock 03-08-2008, 04:39 AM Are you doing any conditional formatting as that has caused problems to some posters,see here (http://www.access-programmers.co.uk/forums/showthread.php?t=142481),
however no solution or further follow up to help you.
Brian
jjjason 03-08-2008, 05:38 AM Nothing like that no. Is there a nice simple way just to add a subtotal to the end of each group? I would've thought this would be easier...
Brianwarnock 03-08-2008, 06:57 AM Yes, in the froup footer place a text box, its control source is =Sum([control to be summed])
This must be the control name not the name of the textbox on the report containing that control, tho' if you used a wizard to create your report they will probably be the same.
Brian
jjjason 03-08-2008, 07:26 AM It worked! I'm sure I tried that before - I must've tried every other combination. Back to school for me I think. Thanks a lot, much appreciated.:)
Brianwarnock 03-08-2008, 07:32 AM Yes, in the froup footer place a text box, its control source is =Sum([control to be summed])
Happy to help, of course the froup footer is much more flexible than the Group Footer. :D
Brian
jjjason 03-08-2008, 07:42 AM Ah, well almost worked, it still gives a running total, not just a total for each group, regardless of what I select in the running sum box. Its like that has nothing to do with it...
jjjason 03-08-2008, 07:45 AM I should probably double check things more before posting, when I switched the running sum field to "No" it worked fine. But I would've thought I'd want the running sum to be "over group", to add each group, and "over all" to add the whole report. Hmm...
Brianwarnock 03-08-2008, 07:46 AM Can you compact, zip and attach your db.
Brian
jjjason 03-08-2008, 08:00 AM Ah well I feel a bit bad you looking over it properly, its a piece of work for Uni, so I should really solve the problems myself - despite the lack of teaching! I think I'm nearly getting there, god knows how the other people in my class are going to get anywhere - I'm proud I got this far - I haven't had to use Access for years now....
Brianwarnock 03-08-2008, 08:18 AM That is very honest and honourable of you, we get students expecting us to do their course work.
Running sum is a different situation than just getting a Group Total, I've only done it to help posters so don'y know it well enough to answer questions, just fumble my way through :eek:,
I would read up on help, and maybe search the forum on running sum, the general thread has a sticky on how to use Google to search the forum, and then start again.
Best of luck with your studies.
Brian
jjjason 03-08-2008, 08:29 AM Cheers for that. I wouldn't want to deprive myself of that nice warm feeling you get when finally solving a problem anyway - I think I'm on the home streach now - just a world of documentation to do!
|
|