procedure TForm3.jxxzExit(Sender: TObject);
begin
  if jxxz.Count>0 then
   begin
           if jxxz.Checked[jxxz.ItemIndex] then
      
 begin
      *****  gypz.Filter:='pzmc='''+pzmc1.Text+''' and jx='''+trim(jxxz.Items[jxxz.ItemIndex])+''' and jyzt=''trim(已检)''';
        gypz.Filtered:=true;
*****
       if gypz.RecordCount=0 then
         begin
           showmessage('工艺历史记录中还没有此工艺请从基本工艺库中选择');
         end;
       with adoquery7 do
         begin
              close;
              sql.Clear;
              sql.Add('select gyzk from fbgyk where  jx='''+trim(jxxz.Items[jxxz.ItemIndex])+'''');
              open;
              end;
         // showmessage('ds fjsdk fds ');
         gysjzk.Text:=adoquery7.fieldbyname('gyzk').AsString;
      end;
      end;
      end;

解决方案 »

  1.   

    跟踪了吗?也不执行?
    gypz.close;
    gypz.filter:=;

    gypz.open;
    试试看
      

  2.   

    怎么个不执行法?gypz.filtered := false ;
    gypz.Filter:='pzmc='''+pzmc1.Text+''' and jx='''+trim(jxxz.Items[jxxz.ItemIndex])+''' and jyzt=''trim(已检)''';
    gypz.Filtered:=true;
      

  3.   


          *****  gypz.Filter:='(pzmc='''+pzmc1.Text+''') and (jx='''+trim(jxxz.Items.strings[jxxz.ItemIndex])+''') and (jyzt=''trim(已检)'')';
      

  4.   

    (jyzt=''trim(已检)'')
    改为 
    (jyzt=''已检'')
      

  5.   

    在Filter前将Filtered置为False
    另外函数写在''里头已经没有功效