alogrep 0 Posted 5 hours ago HI. I have lost 21 hours on this,. I have a stringrid that I need to make a function work correcly. I store a value of Zero in all cells[13,row]. I pass the grid to another function, and right at the beginning of this function misteriousely that value is changed to '1'; This is the code begin linesdone:=''; // SO FAR IT IS OK, STILL '0' prnums:=Tstringlist.create; with dm2 do begin stationprinters.indexname:='number'; stationprinters.setrange([_mycompname,1],[_mycompname,123]) ; stationprinters.first; while not stationprinters.eof do begin prnums.add(stationprinters.fieldbyname('printernumber').asstring); stationprinters.next; end; stationprinters.cancelrange; end; chekqtys; // AS SOON S IT GETS HERE THE VALUE IS '1'; The even strangerthis is that if I comment out the prnums.add(stationprinters.fieldbyname('printernumber').asstring); the value stays to '0'. But then I cannot use the rest of the function, b/c I need the count and the printerindex that need to be used. The stationprinters table has no relation to the stringgrid whatsoever. Anybody has any hint,clue,suggestion,guessing or anything that can help me avoid going crazy? Share this post Link to post
Die Holländer 88 Posted 4 hours ago Very difficult to understand your question.. You talk about a stringgrid but in the code you posted the grid isn't mentioned. You talk about a value? What value? All the valueS (more values) in the rows of the grid? Share this post Link to post