DLookup Problems

Skip to first unread message

Patrick Goodyear

Sep 7, 2014, 8:01:06 PM9/7/14
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...



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.


& [sfrm_tblPaths].[Text99] & "'")

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

Kind Regards,


Bob Quintal

Sep 8, 2014, 4:31:52 PM9/8/14
Patrick Goodyear <patric....@gmail.com> wrote in
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!

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

This email is free from viruses and malware because avast! Antivirus protection is active.

Reply all
Reply to author
0 new messages