Subject Re: AGAIN - [IBO] Search question
Author Harald Klomann
Nico Callewaert wrote:
>
> If I would remove the InvalidateSQL, the statement will not reprepare again.
> To set the SQLWhereItems in the OnClick event of a checkbox won't work
> because, the only place you can have SQLWhereItems defined is in the
> OnPrepare clause of the query. So when a user clicks the checkbox, I need
> to Reprepare the statement, so the correct SQLWhereItems is set in the
> OnPrepare event.
>

Ok, I see what you want do !

in the OnClick event of the checkbox :

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
IB_Query1.InvalidateSQL;
IB_Query1.Refresh
end;


Then it will work !

Harald