Forum Discussion
Balance with Max
- Jan 06, 2022
you maybe right, see Query1 (also query qryLC_MaxDate).
I may misunderstand, but here's how I would think you want it. Note that my proposal is the same as the approach Maria suggested.
- Tony2021Jan 06, 2022Iron Contributor
HI Maria / George, thank you for the response. I appreciate it. Maria, I don't completely follow. I tried to implement but I am failing.
George: I dont think I can use a Max on the Balance since the values are not always increasing...they decrease sometimes so maybe a max would need to be on the letterOfCreditID. This is how I see it but when I put a max on the LetterOfCreditID it doesnt perform. Looking for some guidance.
thank you.
Looking forward to your response.- George_HepworthJan 06, 2022Silver Contributor
Max() refers to the largest value in the CURRENT recordset, regardless of how that recordset is sorted.
Last() refers to the record in the final position in the CURRENT recordset, depending on how that recordset is sorted.
I take you to mean, therefore, that the size of the value is not what you mean by Last. What is you want is the MOST RECENTLY ENTERED record. You can't do that reliably by referring to the ID field, LetterOfCreditID. You have to select the MAX of the Date on which the LetterOfCredit record was entered.
Is that the right interpretation.
- Tony2021Jan 06, 2022Iron ContributorGeorge, I think the Max of the date could work since I have Not Is Null criteria on [DateRecBeneConsent]. I think I referred to only Max. I have never used Last. I am open to anything that works though.