I have an ADOTable with multible fields. I need to filter on two fields, PayFor and PayYear, both string values. The filter values are:
PayFor = Reunion
PayYear = 2012
The following code does not work:
var
s: string;
t: string;
begin
With Form_Main.ADOTable5 do
begin
s := 'Reunion';
t := '2012';
Filter := 'PayFor = ' + QuotedStr(s) and PayYear = ' + QuotedStr(t);
Filtered := true;
PayFor = Reunion
PayYear = 2012
The following code does not work:
var
s: string;
t: string;
begin
With Form_Main.ADOTable5 do
begin
s := 'Reunion';
t := '2012';
Filter := 'PayFor = ' + QuotedStr(s) and PayYear = ' + QuotedStr(t);
Filtered := true;