DLookup Problems

7 views
Skip to first unread message

Patrick Goodyear

unread,
Sep 7, 2014, 8:01:06 PM9/7/14
to
I wouldn't have called myself a newbie, but my current problem makes me
feel like one. I have a subform that has two text boxes that look up a
text value in the records based on a numeric value on the form. These
work perfectly...

=DLookUp("[NEName]","[tblBasicConfig]","[tblBasicConfig]![MW_Site_ID]=[sfrm_tblPaths]![MW_Site_ID]")

=DLookUp("[NEName]","[tblBasicConfig]","[tblBasicConfig]![MW_Site_ID]=
[sfrm_tblPaths]![RX_MW_Site_ID]")

Then I have a text box that try's to look up a numeric value, based on
two numeric values (also tried with text values) on the form. Doesn't
work at all. I know it's in the criteria; I've run it without the
criteria, and it returns the first value in the table. I have tried
every combination of brackets and quotes, but I either get a #Name
error, a #Error error (that blinks like the screen update is looping, or
no value at all. I've tried updating the box by selecting it an
pressing F9.

Here are three different versions I have tried. If you can see what my
error is I would greatly appreciate you pointing it out.

=DLookUp("NewTx_Frequency","tbl_Full_Paths","UniquePath=Forms!sfrm_tblPaths!Text99")

=DLookUp("[NewTx_Frequency]","[tbl_Full_Paths]","[Forms]![UniquePath]='"
& [sfrm_tblPaths].[Text99] & "'")

=DLookUp("[NewTx_Frequency]","[tbl_Full_Paths]","[UniquePath]='" &
[sfrm_tblPaths].[Text99] & "'")

Kind Regards,

Patrick

Bob Quintal

unread,
Sep 8, 2014, 4:31:52 PM9/8/14
to
Patrick Goodyear <patric....@gmail.com> wrote in
news:fvqdnfrLRK5ebJHJ...@posted.gcicommunications:
if the [Unique_path] is a number the filter value then
[sfrm_tblPaths].[Text99] must be a number, try
DLookUp("NewTx_Frequency","tbl_Full_Paths", "UniquePath = " & Forms!
sfrm_tblPaths!Text99)

--
Bob Q.
PA is y I've altered my address.

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

Reply all
Reply to author
Forward
0 new messages