View Single Post
  #4  
Old January 4th, 2010, 05:59 PM posted to microsoft.public.access.forms
Dorian
external usenet poster
 
Posts: 542
Default Syntax Error on DLookup

What kind of data is in Measurements?
If it is text rather than a number, you need to include the value in your
DLookup in single quotes. e.g.
"Measurements = '" Me.Parent!Measurements & "'")

I'd also lookup in Access help on Subforms especially how to refer to one
subforms controls from another.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".


"Pamela" wrote:

I have a code that I've copied and used several times but it isn't working in
this one instance. The control to which this is attached is on a subform
nested 4 deep. The control to which it is referring "Measurements" is on
Subform3 (the parent of subform4). Here's my code:
DLookup("Expr1", "qryMeasurements", "Measurements = " &
Me.Parent!Measurements) & " "
Please let me know what I may be missing. Thanks so much!
Pamela