John,

I am a little embarresed, I cannot find a single exmple of a date based
filter in our code (probably because we had trouble getting the filed order
right and therefore avoided them).

I do however have a few examples of useing filters and I anclose a modified
snippet which may help you for formatting purposes.  I assu,me you are aware
that over use of filters should be discouraged as all they do is hide parts
of the dataset from the application,  think Query where ever possible:

regards Tony Goodrich

This snippet filters based on the contents of the string MyString being
equal to the field UnitId and the Integer fields MyInt1 and MyInt2 being the
same as EntityDestination and LocalState respectively.  The function
StrQuote just sticks quotes around the string specified:



var
    Query:       String;

begin

    Query := '('   + StrQuote(MyString)    + '=UnitId) AND '+
                    '('   + IntToStr(MyInt1)   + '=EntityDestination) AND '+
                    '('   + IntToStr(MyInt2) + '=LocalState)';

    QQueue.Filter := Query;

end;





---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to