Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter problem

Status
Not open for further replies.

MLNorton

Programmer
Nov 15, 2009
134
US
This filder does nor work. What is the solution?
ADOTable1.Filter := ('MemLetter <> ' + quotedStr('-')) and ('MemLetter <> ' + quotedStr('Sent'));
 
The Filter property is a string. The expression you've got here results in a Boolean. Try instead

Code:
ADOTable1.Filter := '(MemLetter<>' + QuotedStr('-') + ') and (MemLetter<>' + QuotedStr('Sent') + ')';

or to make it easier to read IMO:

Code:
ADOTable1.Filter := '(MemLetter<>''-'') and (MemLetter <>''Sent'')';
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top