Hi all,
I'm trying to return the most recent value from a table, before today's date.
As this is a web database, I believe I need to use a data macro to achieve it (which I'm very new to).
So far, I have:
The problem is that I cannot specify the order. This means that the returned value is indeed one of the prices before today's date, but not the most recent one before today's date.
Is there any way to sort the table by date before performing the lookup?
Many thanks in advance
I'm trying to return the most recent value from a table, before today's date.
As this is a web database, I believe I need to use a data macro to achieve it (which I'm very new to).
So far, I have:
Code:
Look Up A Record In tblPrices
Where Condition = [tblPrices].[dtPriceDate] <= Date()
Alias
Set Return Value
Name latestPrice
Expression = [tblPrices].[dblPrice]
Is there any way to sort the table by date before performing the lookup?
Many thanks in advance