I've been trying numerous iterations with no luck for what should be simple.
I want to get a value from a previous record where the fk is the same and the year is one less than the current record.
Note that LoanFC_Year is a text field and the calculation: LoanFC_Year -1 does return the correct value.
The fk is a number and LoanFC_LastPymtDateYearly is a date.
This calculation should return a date.
ExecuteSQL ( "SELECT Sum(LoanFC_LastPymtDateYearly)
WHERE ? = LoanFCfkLoanID
AND LoanFC_Year = ?"
; "" ; "" ; ""; LoanFCfkLoanID; LoanFC_Year -1)
All I get is ?