procedure TForm.ADOQuery1FilterRecord(DataSet: TDataSet; var Accept: Boolean); begin Accept:=(DataSet['Date'] > DataSet['EndDate']); end;