A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

calculated control in group and report footer



 
 
Thread Tools Display Modes
  #1  
Old December 14th, 2006, 08:53 PM posted to microsoft.public.access.forms
Marianne
external usenet poster
 
Posts: 91
Default calculated control in group and report footer

I have 10 amt fields and two checkbox fields in the detail section for each
record. I want to sum the amounts for each checkbox choice in the group
footer.

choice1-checkbox true, amt1=1.00
choice1-checkbox true, amt2=3.00
choice2 checkbox true, amt3=5.00

group footer total: total choice1=4.00
group footer total: total choice2=5.00

This doesn't work. I get the total for all amounts.

=IIf([choice1]=True,Sum(Nz([Amt1],0)+Nz([Amt2],0)+Nz([Amt3],0)+Nz([Amt4],0)+Nz([Amt5],0)+Nz([Amt6],0)+Nz([Amt7],0)+Nz([Amt8],0)+Nz([Amt9],0)+Nz([Amt10],0)),0)
  #2  
Old December 14th, 2006, 09:04 PM posted to microsoft.public.access.forms
Doug_C
external usenet poster
 
Posts: 37
Default calculated control in group and report footer

You need to have a text box that sums each field. The way you have it set up
is if one checkbox is true, add all the other fields together. To get a total
of all Choice1, you need a textbox to sum choice1, to total all of choice2
you need a textbox to sum all of choice2 and so on and so on. The group
footer is the correct place to get the totals for each group. In control
source for each field you might use try =Sum([choice1]) and see how that
works. It works fine for me in my reports. Hope this helps!!

"Marianne" wrote:

I have 10 amt fields and two checkbox fields in the detail section for each
record. I want to sum the amounts for each checkbox choice in the group
footer.

choice1-checkbox true, amt1=1.00
choice1-checkbox true, amt2=3.00
choice2 checkbox true, amt3=5.00

group footer total: total choice1=4.00
group footer total: total choice2=5.00

This doesn't work. I get the total for all amounts.

=IIf([choice1]=True,Sum(Nz([Amt1],0)+Nz([Amt2],0)+Nz([Amt3],0)+Nz([Amt4],0)+Nz([Amt5],0)+Nz([Amt6],0)+Nz([Amt7],0)+Nz([Amt8],0)+Nz([Amt9],0)+Nz([Amt10],0)),0)

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.