Solved

searching table

Posted on 1998-05-02
1
152 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

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…

733 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