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

help with dlookup on control source on property sheet

Status
Not open for further replies.

davyre

Programmer
Oct 3, 2012
197
AU
Hi,
I need help with using DlookUp on control source of a textbox in a report.
Code:
dlookup([POnumber],"TblCustOrder",[CustomerID]=CustomerID)

What I'm trying to do is to grab the PONumber from TblCustOrder Where CustomerID equals to CustomerID from a query that is used as Record Source of that Report.

Any help? Thanks!
 
this does not work either
Code:
=DLookUp([TblCustOrder]![PONumber],[TblCustOrder],[TblCustOrder]![CustomerID]=[TryQueryStatus]![CustomerID])
 
Why not add tblCustOrder to the report's record source?

If CustomerID is numeric and the field is in the report's record source, try:
Code:
=DLookup("[POnumber]","TblCustOrder","[CustomerID]=" & [CustomerID])

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top