#Num and #Error on report calculations

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using this expression to calculate a % of the total and this works
perfectly. I have checked all the field names and property settings and they
all the same.

=Val([SumOfSum_Scan_Err1]/[SumOfSum_Scan_Errs])

I attempt to use the same structure for other fields in the same report (
different field names) and I get the #Num if I try it this way:

=Val([SumOfSumOfErr13_txt]/[SumOfSum_Errors_txt])

I get #Error if I try it this way

=Val([SumOfSumOfErr12]/[SumOfSum_Errors])

So what's the magic expression? I have run into this problem with Access97
in previous reports. Why does it do this?

I appreciate your help. Happy Friday!

Marianne
 
I have found the #Num is usually an indication of division by 0.
Try this:
=IIF([SumOfSum_Scan_Errs]=0,0,[SumOfSum_Scan_Err1]/[SumOfSum_Scan_Errs])

Randy
 
Randy,

That worked! Thanks so much for your help. Have a great weekend.

Marianne

Randy07 said:
I have found the #Num is usually an indication of division by 0.
Try this:
=IIF([SumOfSum_Scan_Errs]=0,0,[SumOfSum_Scan_Err1]/[SumOfSum_Scan_Errs])

Randy

Marianne said:
I am using this expression to calculate a % of the total and this works
perfectly. I have checked all the field names and property settings and they
all the same.

=Val([SumOfSum_Scan_Err1]/[SumOfSum_Scan_Errs])

I attempt to use the same structure for other fields in the same report (
different field names) and I get the #Num if I try it this way:

=Val([SumOfSumOfErr13_txt]/[SumOfSum_Errors_txt])

I get #Error if I try it this way

=Val([SumOfSumOfErr12]/[SumOfSum_Errors])

So what's the magic expression? I have run into this problem with Access97
in previous reports. Why does it do this?

I appreciate your help. Happy Friday!

Marianne
 
Back
Top