Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lookup from a nested subform returning #Name

Status
Not open for further replies.

Hillary

Programmer
Feb 15, 2002
377
US
I have a Main Form (frmProject), a subform (frmPO) and a nested subform (frmPO Line). There is also a table tblItems.

My nested subform has a combo box that picks up the Item ID and I am trying to set the Item Description (and Unit Cost - that will be another field) in the nested subform so I can calculate the total cost.

I have the following Lookup that is returning #Name, DLookup("[Item Description]", "[tblItems]", "[tblItems].[Item ID] = Forms![frmProject]![frmPO]![frmPO Line].[Item ID]")

Can anyone see a problem with the lookup?

Thanks,

Hillary
 
And this ?
[Forms]![frmProject]![frmPO].Form![frmPO Line].Form![Item ID]

You may play with the expression builder (loaded forms) to discover the exact syntax.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks for your effort but it's still the same.

When I use the Loaded Form, drill down to the nested subform and double click on Item ID, the only thing that goes into the Expression Builder is <<expr>> [Item ID] <<expr>>

How do I get the Expression Builder to return the "long type" expression??? ie (Forms![frmProject]![frmPO].Forms!...)

Thanks!

Hillary
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top