G
glink
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.ListBox1Click(Sender: TObject);
var myCondition:string;
begin
with form1.Table1 do
begin
myCondition :=ListBox1.items[ListBox1.itemIndex];
//filter:='[地区]=''福州'''; //运行正常;
filter:='[地区]='myCondition''; //运行不正常,为什么?
//filter:='[地区]='''+myCondition+'''; //运行不正常,为什么?
filtered:=true;
end;
end;
var myCondition:string;
begin
with form1.Table1 do
begin
myCondition :=ListBox1.items[ListBox1.itemIndex];
//filter:='[地区]=''福州'''; //运行正常;
filter:='[地区]='myCondition''; //运行不正常,为什么?
//filter:='[地区]='''+myCondition+'''; //运行不正常,为什么?
filtered:=true;
end;
end;