Subject Re[2]: [IBO] tib_lookupcombo and dataset containing null values
Author Gabriel Juncu
Hi List!

Mario, I agree with your suggestion, I also was faced with customers that did
not know how to delete the lookup contents. More than that, I had some
situations where I must be sure that the operator intended to post the record
with the field empty, so I have to force him to choose something in lookup
combo, even if he chooses <none>. If the lookup combo is empty (as it is when
inserting a new record), the "Post" button is inactive. The only solution
that came to my mind was to insert a "nondeletable" record in lookup table
with ID = 0 (pk) and with text "<none>" and in my program not to test for
null values but for 0 values. The drawback is that when I create a new
database, I must create all these nondeletable records.

Regards,
Gabriel

------------------------------------------------

Monday, August 13, 2001 11:45:32 AM, Mario Zimmermann wrote:

> If a lookup key should be NOT NULL, then I don't understand why a
> TIB_LookupCombo allows to press <DEL> for retrieving a NULL value.
> Since this not Windows standard to work with a combo box, I don't find
> it user friendly. So I am getting asked by my customers how to remove
> a previously chosen selection from a lookup combo.

> Ok, it seems that I am the only one with this suggestion...

> Thanks for all replies.
> Mario


> --- In IBObjects@y..., Helen Borrie <helebor@d...> wrote:

>> LookupID Description
>>
>> 0 '<None>'
>> 1 'Cheese and chocolate'
>> 2 'Escargots'
>> 3 'Jalapeno and vanilla'
>>
>> For lookup keys you should define a default and/or NOT
> NULL, just to ensure that a new row never gets stored with a NULL
> there.