From your naming, I'm guessing you're trying to refer to a control on a
subform.
Subforms are different than regular forms. They're not actually put in the
Forms collection, so you can't refer to them that way: you need to go via
the parent form:
=DLookUp("[RFQType]","RFQ","[RFQNo] =" &
Forms!NameOfParentForm!sfrmLineItem.Form!RFQNo)
This assumes that the name of the subform control on the parent form is
named sfrmLineItem. Depending on how you added the subform to the parent
form, the subform control may actually be named differently than the name of
the form that's being used as a subform. If they're different, make sure you
use the name of the subform control.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Nanette said:
I copied the syntax exactly from MS Help (substituting my data of course),
but keep getting the #Name in the text box. It is in the Control Source of
a
text box.
=DLookUp("[RFQType]","RFQ","[RFQNo] =" & Forms!sfrmLineItem!RFQNo)