Re: How to re-populate DBgrid after doing a search
From: Barak zabari (lotemlotad_at_yahoo.com)
Date: 03/17/05
- Next message: Barak zabari: "Re: Building master detail relationship"
- Previous message: Oliver Tse: "Building master detail relationship"
- In reply to: Richard Caruana: "Re: How to re-populate DBgrid after doing a search"
- Next in thread: Richard Caruana: "Re: How to re-populate DBgrid after doing a search"
- Reply: Richard Caruana: "Re: How to re-populate DBgrid after doing a search"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 17 Mar 2005 10:46:13 +0200
When you do the search you are probably doing one of two things
You set the filter property of the query to the search condition or you open
the query with a where.
So in your code you have either
Qry.filter := 'KeyField='+Edit.text;
Or
Qry.Close;
Qry.Sql.Add('Where KeyField='+Edit.Text);
Qry.Open;
If you use filter then you can do
Qry.Filter='';
If you use the Sql then you need to do
Qry.Close;
Qry.Sql.Clear;
Qry.Sql.Add ('Select * from <AccesTableName>');
Qry.Open;
You should look and see what code happen when you click the search button
and maybe post it here so we could give you a better answer.
barak
"Richard Caruana" <caruanar@acay.com.au> wrote in message
news:42391EB0.A22D0BFE@acay.com.au...
> Please forgive my ignorance but how do you run the same SELECT statement
>
> which you are assuming that I know something about but I don't, that is
> why I am asking.
>
> Please give answer in example with code...
>
> thanks
>
> Richard
>
> Bill Todd wrote:
>
> > Run the same SELECT statement that you ran the first time.
> >
> > --
> > Bill Todd (TeamB)
> > TeamB cannot answer questions received via email
>
- Next message: Barak zabari: "Re: Building master detail relationship"
- Previous message: Oliver Tse: "Building master detail relationship"
- In reply to: Richard Caruana: "Re: How to re-populate DBgrid after doing a search"
- Next in thread: Richard Caruana: "Re: How to re-populate DBgrid after doing a search"
- Reply: Richard Caruana: "Re: How to re-populate DBgrid after doing a search"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]