Query5.SQL.Clear; Query5.SQL.Add('select * from tabledop where b='+form7.Query1.FieldByName('kk').AsString); Query5.Active:=true;