Solved

Run Time Multi Fields Table Filter

Posted on 1998-10-27
2
224 Views
Last Modified: 2010-04-06
How to change multi fields table filter at run time ?
0
Comment
Question by:chio
  • 2
2 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 50 total points
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now