I get the DIVISION BY ZERO error when running this query. The only thing
that changed was this query design:
OLD:
Specificity %: 100-(([Sum Of SumOfTrue (-)]/([Sum Of SumOfTrue (-)]+[Sum Of
SumOfFalse (+)]))*100)
Specificity %: (([Sum Of SumOfTrue (-)]/([Sum Of SumOfTrue (-)]+[Sum Of
SumOfFalse (+)]))*100)
Any of the SUM OF can have a value of 0.
Please help
Here is how my indiviual
Kate,
Consider using IIf() like:
SpecificityPct: IIf([some expression]=0,0, [Another Expression]/[Some
Expression])

Signature
Duane Hookom
MS Access MVP
>I get the DIVISION BY ZERO error when running this query. The only thing
> that changed was this query design:
[quoted text clipped - 12 lines]
>
> Here is how my indiviual
K - 12 Jul 2006 10:48 GMT
So is this correct:
Specificity %: (IIF([Sum Of SumOfTrue (-)]0,0/IIF([Sum Of SumOfTrue (-)0,0+
IIF[Sum Of SumOfFalse (+)]0,0))*100)
So that for every expression [Sum of Sum???], I must use the IIF statement
in front of it OR will just this work:
Specificity %: (IIF([Sum Of SumOfTrue (-)]0,0/([Sum Of SumOfTrue (-)]+[Sum Of
SumOfFalse (+)]))*100)
Thanks for your help,
> Kate,
> Consider using IIf() like:
[quoted text clipped - 17 lines]
> >
> > Here is how my indiviual
Duane Hookom - 13 Jul 2006 04:22 GMT
I don't see any "=0" in your expression like I had in mine. Also IIf is
always followed by a "(" like in my expression.

Signature
Duane Hookom
MS Access MVP
> So is this correct:
>
[quoted text clipped - 34 lines]
>> >
>> > Here is how my indiviual
Kate - 13 Jul 2006 15:47 GMT
Sorry:
Specificity %: IIF((([Sum Of SumOfTrue (-)]=0,0/([Sum Of SumOfTrue (-)]+[Sum
Of SumOfFalse (+)])))*100)
Thanks,
K
> I don't see any "=0" in your expression like I had in mine. Also IIf is
> always followed by a "(" like in my expression.
[quoted text clipped - 37 lines]
> >> >
> >> > Here is how my indiviual
Duane Hookom - 13 Jul 2006 16:26 GMT
I had
IIf(...=0, 0 , ....)
you have
IIf(...=0, 0/... , ....)
I'm not sure what expressions you are dividing by what. I expect you need
something like:
Specificity %: IIf( [Sum Of SumOfTrue (-)]=0, 0, ([Sum Of
SumOfTrue (-)]+[Sum Of SumOfFalse (+)] ) *100/ [Sum Of SumOfTrue (-)] )
Your use of parens and symbols in field/column names makes your expression
difficult to understand.

Signature
Duane Hookom
MS Access MVP
> Sorry:
>
[quoted text clipped - 49 lines]
>> >> >
>> >> > Here is how my indiviual