ELookup #Name? Issue

ardy

Registered User.
Local time
Today, 00:13
Joined
Sep 24, 2012
Messages
98
Hello all:
I am trying to use Allen Browne’s Extended DLookup() http://allenbrowne.com/ser-42.html namely ELookup(), But am running to a bit of problem. At first I got some syntax errors in which I figured out but now I am hitting a wall with No result…..I am hoping some of you might be able to shed some light on this…….


Let me explain the landscape……
I am using this in a form(A) an unbounded control. The form I am using is referencing “Table A(Facility)” The unbounded control is using the expression(ELookup) to look at a value(number) using a control box Value(string) in form A… It should work but it is giving me the #Name? :banghead:……. Any help is appreciated…..
Code:
[FONT=&quot]=ELookup("[MP_Elev]","Elevation","Well_ID = " & [Forms].[Facility_Datails].[Well_ID],"ChangeDate DESC")[/FONT]
Regards
Ardy
 
Yes The form will open (see Attachment)
 

Attachments

  • ELookup.jpg
    ELookup.jpg
    89.6 KB · Views: 149
See here:
Code:
[Forms][COLOR="red"]![/COLOR][Facility_D[COLOR="Red"]a[/COLOR]tails][COLOR="red"]![/COLOR][Well_ID]
 
Changed it as suggested, same result (#Name?)... I think I have Already tried this,,,
Code:
=ELookup("[MP_Elev]","Elevation","Well_ID = " & [Forms]![Facility_Datails]![Well_ID],"ChangeDate DESC")
Ardy
 

Attachments

  • ELookup-2.jpg
    ELookup-2.jpg
    76.6 KB · Views: 101
Your Form is called Facility_Details not Facility_Datails. Check again. :cool:
 
OK.... This is really embarrassing, You are right it's Details not Datails.....
Corrected that and now it gives me a syntax error

Syntax error (missing operator) in query expression 'Well_ID = 05S02W32E002'.
The Well_ID is string alpha numeric.......
 
Thanks for the info......I have modified it as per the Article........
The ELookup is looking for a numeric value (MP_Elev) using an String, Alpha Numeric (Well_ID), If I understand this the Expression should be build for Text, if I am right it should look like this
Code:
=ELookup("[MP_Elev]","Elevation","Well_ID = ' " & [Forms]![Facility_Details]![Well_ID] & " ' ","ChangeDate DESC")

No Syntax error but I don't get any results it comes up blank......The test data I have it should come up as 102
 
Try this (exactly as-is):
Code:
=ELookup("[MP_Elev]", "Elevation", "Well_ID = '" & [Forms]![Facility_Details]![Well_ID] & "'", "ChangeDate DESC")
 
It Worked.......Great......Thanks.....

So Is it the extra space that prohibit it from giving the result.......?
 
That's right. So the text "facility" is different from " facility "
 
Thank you very much for your help
 

Users who are viewing this thread

Back
Top Bottom