i’m trying to filter a table with 2 different filters, so that when a button is pressed the only records displayed are those with a certain Job_ID and those with the Type ‘Private’.
i have the following code:
if CBSearchType.Text = 'Private' then
begin
DBTravel.DataSource.DataSet.DisableControls;
DBTravel.DataSource.DataSet.Filtered := False;
DBTravel.DataSource.DataSet.Filter := ('Job_ID = '+edtAddJobID.Text) AND ('Type = '+QuotedStr('Private'));
DBTravel.DataSource.DataSet.Filtered := True;
DBTravel.DataSource.DataSet.First;
DBTravel.DataSource.DataSet.EnableControls;
end;
however when i try to compile the error message ‘Operator not applicable to this operand type’ is displayed, any suggestions?
thanks
The filter property must be a string