IF LedgEntryDimEntryNo < MaxNumber THEN GLEntry.SETRANGE("Entry No.",LedgEntryDimEntryNo,MaxNumber); UNTIL (GLEntry.NEXT = 0) OR (LedgEntryDimEntryNo = 0); IF ShowProgressWindow THEN UpdateWindowCounter(GLEntry."Entry No.");to
BreakLoop is local boolean variable IF LedgEntryDimEntryNo < MaxNumber THEN GLEntry.SETRANGE("Entry No.",LedgEntryDimEntryNo,MaxNumber); //UNTIL (GLEntry.NEXT = 0) OR (LedgEntryDimEntryNo = 0); BreakLoop := LedgEntryDimEntryNo = 0; IF NOT BreakLoop THEN BreakLoop := GLEntry.NEXT = 0; UNTIL BreakLoop; IF ShowProgressWindow THEN UpdateWindowCounter(GLEntry."Entry No.");