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;
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;
gypz.close;
gypz.filter:=;
gypz.open;
试试看
gypz.Filter:='pzmc='''+pzmc1.Text+''' and jx='''+trim(jxxz.Items[jxxz.ItemIndex])+''' and jyzt=''trim(已检)''';
gypz.Filtered:=true;
***** gypz.Filter:='(pzmc='''+pzmc1.Text+''') and (jx='''+trim(jxxz.Items.strings[jxxz.ItemIndex])+''') and (jyzt=''trim(已检)'')';
改为
(jyzt=''已检'')
另外函数写在''里头已经没有功效