Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Filter using two text fields?

Posted on 1998-09-26
1
Medium Priority
?
135 Views
Last Modified: 2010-04-06
I need to be able to filter a table based on information taken from two edit.text boxes. How do I do this?
Cheers
Mike Ross
0
Comment
Question by:mykyl
[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
1 Comment
 
LVL 2

Accepted Solution

by:
333 earned 100 total points
ID: 1340886
Hi,
Use TQuery, not TTable.

i.e if Query1 is TQuery, then

procedure Form1.Button1Click(Sender:TObject);
begin
  if Query1.Active then Query1.Close;
  Query1.Sql.Clear;
  Query1.Sql.Add('select * from MyTable where Field1="'+Edit1.Text+'" and Field2="'+Edit2.Text+'"');
  Query1.Open;
end;

A.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

596 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