How do I eliminate an overflow error in my queries?

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

Guest

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.
 
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)
 
You might be using the functions CLng Or CInt on numbers that are greater the
Long or integer, try and use Cdbl instead.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top