procedure TForm3.Button1Click(Sender: TObject);
var
  s:String;
begin
  if ComboBox1.Text = '全部' then
  begin
    s := 'select b.ProductName,case a.Type when 1 then''入库'' else ''出库'' end,'+
          'a.OperateTime,a.Quantity from InOutStore a,Product b';
  end
  else
  begin
    s := 'select b.ProductName,case a.Type when 1 then''入库'' else ''出库'' end,'+
          'a.OperateTime,a.Quantity from InOutStore a,Product b where b.ProductName'+
            '='''+ComboBox1.Text+'''';
  end;
  Unit1.Form1.Select(s);
  DBGrid1.Columns[0].Width := 150;
  DbGrid1.Columns[1].Width := 150;
  dbgrid1.Columns[2].Width := 150;
  dbgrid1.Columns[3].Width := 150;
end;select()  :
procedure TForm1.select(s:String);
begin
  with DataModule5.ADOQuery1 do
  begin
    Close;
    sql.Clear;
    sql.Add(s);
    open;
  end;
end;为什么查询出来的数据是重复的??