Solved

searching table

Posted on 1998-05-02
1
151 Views
Last Modified: 2010-04-06
I want to put together a window where the user can see the data from a table in a list box and as they enter a word an edit box, the list refreshes itself to show a subset of the table with what they entered, whether that be a piece of the word or the whole thing.
0
Comment
Question by:dpms
1 Comment
 
LVL 2

Accepted Solution

by:
kjteng earned 50 total points
ID: 1340633
You may use dblookUpList or dbLookUpcombo component to link the lookup display, lookupitem and lookupsource to the table which contains the data.

What do you mean by "to show a subset of the table"? If what
you want is just to search for a particular item, u just have to add an onChange event to the edit component. Something like this:

procedure TForm1.Edit1Change(Sender: TObject);
begin
  table1.findKey([ edit1.text])
end;

Of course an index must be created and in use for the table


0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 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