Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem Calculation

Status
Not open for further replies.

Daybreak

Technical User
Jan 19, 2000
18
US
Access 97. Report, after the detail section I have a &quot;counsel footer&quot; with<br>
many fields of calculations. Below are a few samples:<br>
=Abs(Sum([Court1]=&quot;Bureau&quot;))<br>
=Abs(Sum([Court1]=&quot;WCAC-APPELLEE&quot; Or<br>
[COURT1]=&quot;WCAC-APPELLANT&quot;))<br>
All of these calculations seem to work fine except this one:<br>
=Abs(Sum([Court1]=&quot;COA-APPELLEE&quot; Or<br>
[COURT1]=&quot;COA-APPELLANT&quot;))<br>
When details records have completed for the 1st atty then the counsel<br>
footer with calculations, but when the next atty records complete the<br>
counsel footer reflects the wrong output for this calculation. What is<br>
wrong? It appears that the field is not emptying out from the prior<br>
calculation. What should I do?
 
Can you elaborate on the wrong output? (I'm assuming you've checked the obvious things like running sum property)<br>
--Jim
 
Well first of all what are you trying to do with this?<br>
Absolute value of the Sum Of &quot;court1&quot; if it equals &quot;WCAC-APPELLEE&quot; or &quot;COURT1&quot; eqauls something different.<br>
<br>
Maybe Access is confused as I am.<br>
<br>
Is &quot;court1&quot; the same as &quot;COURT1&quot;?<br>
To Access they are the same there is no difference Access is not case sensitive.<br>
<br>
And if you have two fields on your report spelled like these then try changing on of them to -2 or something.
 
I'm assuming you're counting, ie, [court1] = &quot;whatever&quot; will register -1 if true, resulting in a positive count w/abs().<br>
The below code may seem tedious, but it works.<br>
Field txtcountAppellee: &lt;--In Detail section<br>
Controlsource = IIF([Court1]=&quot;WCAC-APPELLEE&quot; ,1,0)<br>
Running Sum = Over group<br>
<br>
Then, in the group footer, your 'count' field will have control source = txtCountAppellee.<br>
<br>
Repeat for the other values you want to count. I don't really see it as much more tedious than what you have, and since access wont sum() or count() derived text fields, this is a good way to do that.<br>
--Jim
 
Hi all, I seem to be a calculation issue - using the Abs() function.

I have a bunch of check boxes in a table, and the user is requesting some sort of error percentage report. I've been able to get as far the following:

Count of Check boxes: 14
Sum of boxes checked: 9
Difference: 5
Percentage should be: 35.71

I'm using the following caculation:

Count(Abs([AppReplace]))-Sum(Abs[AppReplace]))/Count(Abs([AppReplace]))

But the result that I am receiving is:

13.3571428571429

Does anybody know where the "13" is coming from...because the rest of it seems just fine?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top