$ 0 0 Try to use CustLedgEntry.SETFILTER("Date Filter",'..%1',InputDate); CustLedgEntry.CALCFIELDS(Amount); StartBalance := CustLedgEntry.Amount;