Subject Re: add an item to ib_lookupcombo
Author james_027
--- In IBObjects@yahoogroups.com, "m_kavcic" <m_kavcic@y...> wrote:
> Hello everyone,
> That is not what I thought, but still thank you for the answers.
>
> I have a populated lookupcombo on form selecting different products
> for a report. The user can select one of the through the lookupcombo.
>
> In the possible selection I would like to add an item to the
> lookupcombo (at the beginning) with text:("0" for column ID and "all
> products" for column PRODUCTS).

Iam not sure what you mean. Did did you populate your lookupcombo on
runtime or design? Are they from your database? if you want to add the
"0" for all the product then I think you should have manually done it
or put it on your table.

> Then I would check the if the ID=0 and then make a sql without a
> where clause.
>
> How can I do that?

And for this one. Just put a if then statement ...

first you clear your sqlwhereitems then

if id = 0 then
.. execute the query right away
else
.. put some sqlwhereitems that meet what you need


hope this helps
>
> Thanks, Marko