Hello and thank you in advance for any attention this post may receive.
Table = tblUnit
Result table column = "Make"
Criteria table columns = "ID_Unit" and "Date_Commissioned"
Criteria = ID_Unit = txtUnit value and Max(Date_Commissioned)
My desired result is to return (in txtMake) the Make of the unit in txtUnit, that has the latest commissioned date from tblUnit.
There are multiples of the same unit number in ID_Unit with various commission dates.
This is my txtMake Control Source:
=IIf(IsNull([txtUnit]),"",DLookUp("Make","tblUnit","([ID_Unit]=" & [txtUnit] And [Date_Commissioned]=" & Max([Date_Commissioned]))"))
It is returning the first occurrence where [ID_Unit] = [txtUnit] only.
Thank you again!
Table = tblUnit
Result table column = "Make"
Criteria table columns = "ID_Unit" and "Date_Commissioned"
Criteria = ID_Unit = txtUnit value and Max(Date_Commissioned)
My desired result is to return (in txtMake) the Make of the unit in txtUnit, that has the latest commissioned date from tblUnit.
There are multiples of the same unit number in ID_Unit with various commission dates.
This is my txtMake Control Source:
=IIf(IsNull([txtUnit]),"",DLookUp("Make","tblUnit","([ID_Unit]=" & [txtUnit] And [Date_Commissioned]=" & Max([Date_Commissioned]))"))
It is returning the first occurrence where [ID_Unit] = [txtUnit] only.
Thank you again!