Hello below is the code i am now using but it is still showing some account numbers in the range of 410000 so i am failing to get the reason okay more detail is i am using this code to pull a report so i put this code in G/L Entry, body (2) -OnPresection() could that be a problem ?
GLEntry.SETRANGE(“G/L Account No.”,‘100000’,‘199999’);
IF GLEntry.FINDSET THEN
REPEAT
IF GLEntry.“Global Dimension 1 Code”=‘002’ THEN BEGIN
GovmentGran := GLEntry.Amount;
END
ELSE IF GLEntry.“Global Dimension 1 Code”=‘003’ THEN BEGIN
LocalRevenue := GLEntry.Amount;
END
ELSE IF (GLEntry.“Global Dimension 1 Code” >= ‘100’) AND (GLEntry.“Global Dimension 1 Code” <= ‘199’) THEN BEGIN
Donor := GLEntry.Amount;
END
ELSE IF (GLEntry.“Global Dimension 1 Code” >= ‘200’) AND (GLEntry.“Global Dimension 1 Code” <= ‘299’) THEN BEGIN
Projects := GLEntry.Amount;
END
ELSE IF (GLEntry.“Global Dimension 1 Code” >= ‘300’) AND (GLEntry.“Global Dimension 1 Code” <= ‘399’) THEN BEGIN
Others := GLEntry.Amount;
END;
UNTIL GLEntry.NEXT = 0;