raziel3
Registered User.
- Local time
- Today, 13:48
- Joined
- Oct 5, 2017
- Messages
- 311
Need some help getting the Current Price for an Item based on Quantity purchased.
This is my Item Latest Data Query:
These are the results:
What I have so far:
I am having problems passing the Quantity parameter. But then I thought about if someone bought 11 Items that would mean that the query would have to give me results like this:
Thanks in advance everyone.
This is my Item Latest Data Query:
Code:
SELECT Product.UPC, Product.PNAME, ITEMCOST.CPU, ITEMPRICE.PPU, ITEMPRICE.LQTY
FROM (Product LEFT JOIN ITEMCOST ON Product.UPC = ITEMCOST.UPC) LEFT JOIN ITEMPRICE ON Product.UPC = ITEMPRICE.UPC;
These are the results:
What I have so far:
Code:
Public Function ITEMSPECIAL(iUPC As String, iQTY As Double) As Double
With CurrentDb.OpenRecordset("ITEMDETAIL", dbOpenSnapshot)
.FindFirst (inpUPC)
If Not (.BOF And .EOF) Then
ITEMSPECIAL = !PPU.Value
End If
End With
End Function
I am having problems passing the Quantity parameter. But then I thought about if someone bought 11 Items that would mean that the query would have to give me results like this:
Thanks in advance everyone.
Attachments
Last edited: