Overflow error on calculate field in query - Help Please

  • Thread starter Thread starter FatMan
  • Start date Start date
F

FatMan

Hi all Access Gurus:
I am calculating field (actual a percentage based on the values of two other
fields in the query) and am getting an overflow error when I try to sort on
this field after the query has been displayed. If I do not try to sort on
this field after the query has been displayed my calculation displays the
percentage fine.

My calculation is:

Percent:([Good]-[Bad])/[Good]

In the table where [Good] and [Bad] come from they both have the data type
Number (field size double).

Can anyone please tell me how I can prevent the overflow error? I don't see
how the values I am working with could yield a number that is to large/small
for this field size. Should I change it to decimal?

Any help is greatly appreciated.

Thanks,
FatMan
 
I expect you have records with a Good value of 0.
Try:

Percent:IIf([Good]=0,0,([Good]-[Bad])/[Good])
 
Back
Top