Subject Re: [IBO] Adding OR condition to where clause
Author Geoff Worboys
> If record ID 2 is matching search criteria so record ID 1 must
> be shown, too. AddWhereClause is using AND and brackets so
> there is no way to use OR ,
> e.g.
>
> "where VisualSearchCriteria OR MyInvisibleCondition"

I am not certain, but you could try attaching code to the OnPrepareSQL
handler of the edit control. Use the SearchBuffer property to build
your own where condition and clear the SearchBuffer so that IBO will
not also build with it.

If you want the searchbuffer restored when returning to search mode I
guess you will have to store the value somewhere and restore if using
code attached to OnStateChanged for the datasource.

(Note: I have not tried anything like this, so no guarantees :-)

Alternatively you could build your own TIB_Edit derivative - which
gives you much more flexibility and power in handling the search
criteria.


HTH

Geoff Worboys
Telesis Computing