How do I eliminate an overflow error in my queries?

M

Matthew

I am having an issue with an overflow error in a select query with numerous
aggregate functions but I cannot find any troubleshooting answers to resolve
these issues.
 
D

Douglas J. Steele

If you're using DSum, it's possible that you're summing, for instance, an
Integer field, and the sum is larger than an Integer field can handle.

You could try converting the value to a larger data type. Instead of

DSum("[MyIntegerField]", "[MyTable]", "[Field1] = " & MyValue)

try

DSum("CLng([MyIntegerField])", "[MyTable]", "[Field1] = " & MyValue)
 
O

Ofer

You might be using the functions CLng Or CInt on numbers that are greater the
Long or integer, try and use Cdbl instead.
 
Top