Hello,
I have query in my database (db) which contains fild "LatestPrice".
This field must always pull latest price based on field "DateOfEntry".
"DateOfEntry" is Date/Time field which has default value "Now()" in table "TRAFFIC".
This is how formula looks like in my query
LatestPriceLookUp("[Price]","TRAFFIC","[DateOfEntry]=#" & DMax("[DateOfEntry]","TRAFFIC","[ID_Article] like " & "'" & [ID_Article] & "'") & "#")
It works great, except that it CAN NOT pull any data in case there is more then one record in table "TRAFFIC" with SAME date. So in table "TRAFFIC" I have
these two records in field "DateOfEntry" for one Article
1. 11/10/2015 12:08:27 PM
2. 11/10/2015 4:25:39 PM
and result of price is Null. I need to change criteria for DMax in these cases, so I could pull the newer record. In this case, it is a second one (11/10/2015 *4:25:39* PM).
Is that even possible?
Any help is appreciated and many thanks in advance.
Adi