istjustoldcardboard
New member
- Local time
- Today, 00:43
- Joined
- Apr 16, 2019
- Messages
- 2
In a field on a form I am trying to retrieve the latest pricing information based on the newest date.
tblChecklistPricing
pkCardID curCardBVPrice dtmCardPricingC
585 1.00 4/14/2019
586 1.25 4/14/2019
588 1.25 4/14/2019
585 1.50 4/16/2019
So in the example above, I would like to display "1.50" in the curCardBVPrice field for record #585, since it is the latest date. I tried using the example below but it returns nothing in the field.
=DLookUp("[curCardBVPrice]","tblChecklistPricing","[pkCardID] = " & DMax("[dtmCardPricingC]","tblChecklistPricing","[pkCardID]"))
Thanks!
tblChecklistPricing
pkCardID curCardBVPrice dtmCardPricingC
585 1.00 4/14/2019
586 1.25 4/14/2019
588 1.25 4/14/2019
585 1.50 4/16/2019
So in the example above, I would like to display "1.50" in the curCardBVPrice field for record #585, since it is the latest date. I tried using the example below but it returns nothing in the field.
=DLookUp("[curCardBVPrice]","tblChecklistPricing","[pkCardID] = " & DMax("[dtmCardPricingC]","tblChecklistPricing","[pkCardID]"))
Thanks!