?
Solved

searching table

Posted on 1998-05-02
1
Medium Priority
?
157 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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Screencast - Getting to Know the Pipeline
Suggested Courses

862 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