Hello,
I have two queries. The structure is below:
Query 1 Name: qryNormalBillingReport
Field 1: PERMIT_NUMBER
Field 2: Date
Field 3: PO_BOX
Field 4: QTY
Field 5: BillingAmt
**Note** BillingAmt is a function containing the Dlookup.
Query 2 Name: qryListPricePerPieceByPermitNumber
Field 1: permit_no
Field 2: MonthlyCost
Field 3: MonthlyPieces
Query 2 only returns 3 records. A Sample is here:
The problem that I am trying to overcome is within the BillingAmt Dlookup. Here is the code I have for the BillingAmt field
Essentially, I want the Dlookup function to lookup a value based on the value in the PERMIT_NUMBER field in the same query. I have tried the following to no avail.
Anybody have any ideas on how I should accomplish this?
I have two queries. The structure is below:
Query 1 Name: qryNormalBillingReport
Field 1: PERMIT_NUMBER
Field 2: Date
Field 3: PO_BOX
Field 4: QTY
Field 5: BillingAmt
**Note** BillingAmt is a function containing the Dlookup.
Query 2 Name: qryListPricePerPieceByPermitNumber
Field 1: permit_no
Field 2: MonthlyCost
Field 3: MonthlyPieces
Query 2 only returns 3 records. A Sample is here:
Code:
permit_no MonthlyCost MonthlyPieces
6001 402.97 789
6002 233.55 465
610001 143.65 322
The problem that I am trying to overcome is within the BillingAmt Dlookup. Here is the code I have for the BillingAmt field
Code:
BillingAmt: [QTY]*DLookUp("MonthlyCost/MonthlyPieces","qryListPricePerPieceByPermitNumber","permit_no='[PERMIT_NUMBER]'")
Code:
BillingAmt: [QTY]*DLookUp("MonthlyCost/MonthlyPieces","qryListPricePerPieceByPermitNumber","permit_no='qryNormalBillingReport.[PERMIT_NUMBER]'")