title: Delphi- Passing parameters to ADOquery
body: <p>Dear experts,
  I’m trying to filter the result in dbgrid connected to adoquery, depending on user selection of 4 checkboxes, user can select one or more fileds to filter the data accordingly
  I have this code, and I don’t know how to pass "and/ or not pass" it if user select two or more checkboxes.</p>
  
  <pre><code>Vw_Activity.SQL.Text:='select * from Vw_Activity where ';
  if CBEmployee.Checked then
  begin
  Vw_Activity.SQL.Add('Emp_Name_Ar=:x');
  Vw_Activity.Parameters.ParamByName('x').Value:=emp Name.Text;
  end;
  
  
  if CBTask.Checked then
  begin
  Vw_Activity.SQL.Add('Category_Name=:y');
  Vw_Activity.Parameters.ParamByName('y').Value:=Pro blemCat.Text;
  end;
  
  if CBIncharge.Checked then
  begin
  Vw_Activity.SQL.Add('Support_name_En=:h');
  Vw_Activity.Parameters.ParamByName('h').Value:=Sup portstaff.Text;
  end;
  
  
  if CBstatus.Checked then
  begin
  Vw_Activity.SQL.Add('Request_Status=:k');
  Vw_Activity.Parameters.ParamByName('k').Value:=Req uestStatus.Text;
  end;
  
  Vw_Activity.Active:=true;
  </code></pre>
  
  <p>waitting your help </p>