Solved

Run Time Multi Fields Table Filter

Posted on 1998-10-27
2
229 Views
Last Modified: 2010-04-06
How to change multi fields table filter at run time ?
0
Comment
Question by:chio
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 50 total points
ID: 1344674
Hi chio,

what about this (made this a long time ago for somebody at X-X):

with frmResults.tblActivity do
 begin
  {Prepare filter}
  Filter := '';
  if fldACity.text <> '' then AString :=
       'AND([City]='''+fldACity.text+''')';
  if fldEType.text <> '' then AString := AString +
       'AND([EventType]='''+fldEType.text+''')';
  if fldCuisine.text <> '' then AString := AString +
       'AND([CuisineType]='''+fldCuisine.text+''')';
  if fldHCost.text <> '' then AString := AString +
       'AND([HighCost]<='''+fldHCost.text+''')';
  if fldLCost.text <> '' then AString := AString +
       'AND([LowCost]>='''+fldLCost.text+''')';
  Delete(AString,1,3);
  showmessage(AString);
  frmResults.tblActivity.Filter := AString;
  frmResults.tblActivity.Filtered := true;
 end;


you can also use freeware RxLib (You need it!!) and it's filter thingies : http://rx.demo.ru

regards, Zif.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1344675
about rxlib, I meant : every programmer can have benifit from it. Offcourse, if you use above code, you don't need rxlib
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question