Dlookup not populating field

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

Guest

I am using the dlookup function to display handset type

=DLookUp("[Model]","Prefix List","[Prefix]=left([ReqIMEI],6) ")

This is supposed to display the Moldel from the prefix list table by
comparing the 1st 6 digits of the ReqIMEI with the 6 digit prefix.

This woks fine however only displays when the form is re-opened or when i
scroll through records. I would like to use it to dsplay the hanset type as
each ReqIMEI is entered in the form.
 
Right off-hand, I wouldn't expect it to work at all unless you mistyped it
in your message. Try:

=DLookUp("[Model]","Prefix List","[Prefix]=" & Left([ReqIMEI],6))
or perhaps
=DLookUp("[Model]","Prefix List","[Prefix]=" & CLng(Left([ReqIMEI],6)))

even though you are after 6 digits, if the [Prefix] is a text field then

=DLookUp("[Model]","Prefix List","[Prefix]='" & Left([ReqIMEI],6) & "'")
 
the original dlookup worked only providing the results if the form was
refreshed

was not sure about the "&" - possably why this was not working

Workig now though many thanks 8-)


Wayne Morgan said:
Right off-hand, I wouldn't expect it to work at all unless you mistyped it
in your message. Try:

=DLookUp("[Model]","Prefix List","[Prefix]=" & Left([ReqIMEI],6))
or perhaps
=DLookUp("[Model]","Prefix List","[Prefix]=" & CLng(Left([ReqIMEI],6)))

even though you are after 6 digits, if the [Prefix] is a text field then

=DLookUp("[Model]","Prefix List","[Prefix]='" & Left([ReqIMEI],6) & "'")

--
Wayne Morgan
MS Access MVP


storm warden said:
I am using the dlookup function to display handset type

=DLookUp("[Model]","Prefix List","[Prefix]=left([ReqIMEI],6) ")

This is supposed to display the Moldel from the prefix list table by
comparing the 1st 6 digits of the ReqIMEI with the 6 digit prefix.

This woks fine however only displays when the form is re-opened or when i
scroll through records. I would like to use it to dsplay the hanset type
as
each ReqIMEI is entered in the form.
 
Back
Top