Hi,
A couple of things can cause this, but both of them are similar in that the
result is exceeding the capacity of the data type. Probably the most common
cause is dividing by 0, which gives an infinite result that causes the
overflow error. The other cause is having calculations that return a result
beyond the capacity of the field size. In your case, if you are not dividing
by zero, it is possible that the field size is only integer, which can only
hold values up to 32,767. If you formula results in any values greater than,
or less than, the field size, you will get an overflow error.
When calculating fields in an Access query, Access (or Jet?) sets the field
type/size by looking at the formula. Often though, this field size is not
adequate. You can set the field output size and type by using the various
type conversion functions though. For instance, if you put your formula
inside of the CLng() function, the resulting field will be a long integer.
Similarly, if you use CDbl(), the output will be a double precision floating
point decimal field.
HTH, Ted Allen