Board index » delphi » help on table event onfilterrecord

help on table event onfilterrecord

Eduardo A. Saad
eas...@infosel.net.mx

Hello,
I am trying to use 'OnFilterRecord' for a table, but I give it the
expression and when I try to see the records the dbnavigator keys are
disabled, as if saying 'none of the records make the expression evaluate to
true'.

The code says:

procedure TfrmDepartamentos.Table1FilterRecord(DataSet: TDataSet;
  var Accept: Boolean);
begin
  Accept := frmDepartamentos.Table1.FieldByName('fechacont').value =
strtodate('06/15/98');
end;

end.

I think with this line it does work, but when I try to substitute 06/15/98
with the variable, I get the problem.

Thanks for any help on this.

 

Re:help on table event onfilterrecord


Eduardo A. Saad Monta?o <eas...@infosel.net.mx> wrote in message
news:7p4ff7$l0i2@forums.borland.com...

Quote
>   Accept := frmDepartamentos.Table1.FieldByName('fechacont').value =
> strtodate('06/15/98');

Accept := DataSet.FieldByName('fechacont').AsDateTime =
strtodatetime('06/15/98');

Woody

Re:help on table event onfilterrecord


There is nothing wrong with your code. Have you used the de{*word*81} to see
what the expression evaluates to?

Bill

--

Bill Todd - TeamB
(TeamB cannot respond to questions received via email)

Other Threads