Overflow Error message

G

Guest

Hi, I am opening a form and recieving the following error

Runtime Error '6' Overflow

there is code behind the form which is running on open, the code itself is
very basic however it is using the DMax function on around 10 querys (total
querys all only returning one line) all of these querys are based on another
query which is returning 165000 records. (if this query is limited to
50,000ish records the form loads fine with the correct results)

All of the querys link to other tables so that the selection of records is
limited.

Does anyone know why this is giving me the error or how I can stop it?
 
6

'69 Camaro

Hi.
I am opening a form and recieving the following error

Runtime Error '6' Overflow

there is code behind the form which is running on open, the code itself is
very basic however it is using the DMax function on around 10 querys
(total
querys all only returning one line) all of these querys are based on
another
query which is returning 165000 records.

For future reference, the plural of query is queries, not querys.
Does anyone know why this is giving me the error or how I can stop it?

The most common reason for this error for Access developers is when a
calculation expects a numerical value for an operand, but instead a text
string or date is given for the operand. For example:

4072 + 1418 + "peanut butter" = #Error!#

In other words, the computer is politely telling you that you're trying to
do something that doesn't make any sense. To determine if this is the case,
I'd suggest sorting the columns used for the operands and look at the
highest and lowest values to determine whether or not something crazy was
stored in the table in those particular columns.

The most common reason for this error for other developers (and the second
most common for Access developers) is when the numerical values exceed the
data type's storage capacity. For example, when two two-byte integers are
multiplied and the result is a four-byte long data type, but the data type
for the result to be stored is a two-byte integer. The CPU's registers
contain a higher value (more data) than can be stored in memory. Hence, a
capacity overflow (i.e., the cup runneth over), and there's no way to tell
how much "extra" is lost, so the user is warned.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 
G

Guest

Thanks Gunny, had declared values as integers.... Changed to Long and they
worked first time.... feel like such an eejit :blush:)
 
G

George Nicholson

'69 Camaro said:
You're welcome. And don't feel too bad. At least 99% of us who know what
an overflow error is found out because we did the same thing. :)


.....and probably did it more than once :)
 

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

Similar Threads

inherited database broke 1
Where do I put the count? 1
Excel 2003 and Querys 6
I'm stumped 1
Access Overflow error 3
Eliminate duplicates from query 1
Numeric Overflow Error 4
Comparation of two "like" mdb application 2

Top