overflow

  • Thread starter Thread starter butragenio
  • Start date Start date
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?
 
This is usually caused by numeric datatype not being able to handle the
result of a calculation.

RDH
 
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
 
Back
Top