Subject RE: [IBO] Pasting Search Fields into a TIB_SearchPanel
Author Jerry Sands
Andreas:

Got it! Thanks!

Jerry Sands

-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
Of Andreas Pohl
Sent: Sunday, August 07, 2005 11:57 AM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Pasting Search Fields into a TIB_SearchPanel

Hello Jerry Sands,

> How do I after placing a dataset into search mode, paste search field data
> into several of the edit fields on a TIB_SearchPanel. For an application
I
> need to allow a user to click on a name in another grid from another
dataset
> and copy the first name and last name in preperation to do a search.

sl:=TStringList.Create;
// put a search condition to TIB_Edit control in Form1
sl.add(Format('CTL.Form1.IB_Edit1=%s',["SearchMe"]));
// put a search condition to 2. TIB_Edit control of IB_SearchPanel1
sl.add('CTL.IB_SearchPanel1.edIB_SearchPanel1_1='+'MeToo');
ib_query1.ReadSearch(sl);
ib_query1.Search;
ib_query1.Post;
ib_query1.InvalidateSQL;
ib_query1.Refresh;
sl.free;

To be sure just look at Tib_query.WriteSearch() at runtime.

HTH.

--
Andreas




___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Yahoo! Groups Links