overflow

B

butragenio

Out of the blues, I am getting an "Overflow" error
message while the program runs code. I have pinpointed
down to a DLookUp statement. The data resides on SQL. The
error occurs wherever the program runs. This error has
never occured and I have not changed any code or database
in the past few months. Has anyone come along this
problem?
 
R

R. Hicks

This is usually caused by numeric datatype not being able to handle the
result of a calculation.

RDH
 
T

Treebeard

butragenio said:
Out of the blues, I am getting an "Overflow" error
message while the program runs code. I have pinpointed
down to a DLookUp statement. The data resides on SQL. The
error occurs wherever the program runs. This error has
never occured and I have not changed any code or database
in the past few months. Has anyone come along this
problem?

One of the problems with DLookup is that it returns a null when it doesn't
find any records matching the criteria. You might want to try:

If Not IsNull(DLookup (....) then
' or If Not IsNumeric(DLookup (....) then ... etc
VarX = DLookup (....)


although this slows your program down because now you are doing a double
query
 

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

Top