StringGrid1の項目をComboBox1.TextとComboBox3.TextとComboBox4.Textと一致した複数の項目をStringGrid2のCell[1,6]Cell[2,6]の下に一致した複数の項目をだしたいのですがどうしたらいいかわかりません。
var
RowCNT : Integer;
procedure TForm1.Button2Click(Sender: TObject);
var
i : Integer;
begin
for i:= 0 to RowCNT do
if StringGrid1.Cells[5,i] = ComboBox3.Text Then
if StringGrid1.Cells[6,i] = ComboBox4.Text Then
if StringGrid1.Cells[8,i] = ComboBox1.Text Then
begin
StringGrid2.Cells[1,6] := StringGrid1.Cells[12,i];
StringGrid2.Cells[2,6] := StringGrid1.Cells[13,i];
end;
end;
すいません。いろいろ試していたらできました。
ツイート | ![]() |