Solved Overflow error in Elookup

Kayleigh

Member
Local time
Today, 09:41
Joined
Sep 24, 2020
Messages
709
Hi,
Wonder if anyone came across this issue: I have the following code on the current event
Me.txtConversionWk = Nz(ELookup("cfCnvrsnRate", "qryRtlConversionWk"), 0)
When I run the form and the textbox results to zero (as no results in the query), an error occurs. Any way to resolve this?
 

Attachments

  • elookup error.PNG
    elookup error.PNG
    4.7 KB · Views: 143
no idea but you can put a Breakpoint on the function and step through the code
to find out which record did it fault. then inspect the field of the query of that record.
 
Just to check, you did mean Allen Browne's extended lookup Microsoft Access tips: Extended DLookup() (allenbrowne.com) and not the standard DLookup?
An overflow error normally occurs with a number field where the data is too large for the datatype. Try using e.g. Long integer instead of Integer
 
I tested my table has a Single field type.
create a form and assign a large double value to the field. ==> no error, just truncated value.

change the field to integer. and assign very large long value (and large double value). the same error,
but no overflow error.

for all we know the textbox can be unbound? now where can we declare it as Long/double?
ERR.png
 
I have had overflow errors in integer fields in the past which is the reason I mentioned it as an possibility
Yes - it could indeed be an unbound textbox
 
How could it possibly be Unbound and still cause an Overflow Error? Overflow of what?

Linq ;0)>
 
It is an unbound textbox - formatted as percentage. Not sure how this can be changed to long?
 

Users who are viewing this thread

Back
Top Bottom