Subject Re: [IBO] Cancelling a Search
Author Lester Caine
jaguarius2003 wrote:

> I've got a search bar on my form. Now I am not sure I understnad how
> search works entirely, so here what the process is : hit search, enter
> some criteria hit the post button. Not the dataset seems to have only
> one record.

The search bar controls dssSearch mode and has a button to clear the
selected search values.

> I need an easy way to "unfilter" the dataset so all the records show
> again. I know hitting search then cancel works, but for some reason
> the code
>
> ClientDataSet.Search;
> ClientDataSet.Cancel;
>
> does not have the epected effect. It seems to instead return an emptry
> dataset.

Correct Cancel is not part of dssSearch

> Bottom line I need one button that makes all records visible again.

ClientDataSet.ClearSearch

Check also:-

SaveSearch
RecallSearch
RecallLastSearch
ReadSearch
WriteSearch
RecordCount (will return number of records found)

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services