<p>Am 12.12.2011 21:05 schrieb "Chris Kelling" <<a href="mailto:kellingc@cox.net">kellingc@cox.net</a>>:<br>
> That worked, but now, later in the code:<br>
><br>
>  rowNum := 1;<br>
>  while rowNum <= stgInvOps.RowCount do<br>
>        begin<br>
>          read(inventory,stock);<br>
>          stgInvOps.Cells[0,rowNum] := inttostr(stock.ClassNumber);<br>
>          inc(rowNum);<br>
>        end;<br>
>   closefile(inventory);<br>
></p>
<p>Replace the "<=" condition by "<". The row indices go from 0 to RowCount-1.</p>
<p>Regards,<br>
Sven</p>