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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLOOKUP HELL??

Status
Not open for further replies.

williekay

Technical User
Jun 30, 2003
121
US
I have a form called POtoLOTtbl, it has fields PO No, Lot No. I have a subform linked by Lot No called RECIEVING1 with a suform linked by Lot No called SampleChemistry. I want to reference (and only reference because I don't have a field in the table for) PO No from POtoLOTtbl TABLE based on the Lot No on the SampleChemistry SUBFORM. This

=DLookUp("[PO No]","POtoLOTtbl","[Lot No] =" & [Forms]![SampleChemistry]![Lot No])

DOESN'T WORK[sadeyes]

Willie
 
You need to refer to your subform as a control on the main form. I think the correct format is....
forms!MainFormName!SampleChemistry![Lot No]

Randy
 
Where you have this Dlookup? in the main form ? in the suform?

=DLookUp("[PO No]","POtoLOTtbl","[Lot No] =" & [Forms]![MainForm]![SampleChemistry].Form![Lot No])

or if your Lot No is txt field

=DLookUp("[PO No]","POtoLOTtbl","[Lot No] =""" & [Forms]![MainForm]![SampleChemistry].Form![Lot No] & """")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top