<p><br>
Am 12.12.2011 21:20 schrieb "Sven Barth" <<a href="mailto:pascaldragon@googlemail.com">pascaldragon@googlemail.com</a>>:<br>
><br>
> Am 12.12.2011 21:05 schrieb "Chris Kelling" <<a href="mailto:kellingc@cox.net">kellingc@cox.net</a>>:<br>
><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>
> ><br>
><br>
> Replace the "<=" condition by "<". The row indices go from 0 to RowCount-1.</p>
<p>And replace the "rowNum := 1" by "rowNum := 0" of course.</p>
<p>Regards, <br>
Sven</p>