Subject Re: [IBO] Problem with TIB_ComboBox
Author Helen Borrie
At 07:12 PM 10-04-01 -0300, you wrote:

>I can't really qualify it as business rules, because the user still has to
>make a selection. Here's the scenario:
> The program is being developed for a local soccer league. They
>want to be able to assign to which soccer field the child could play based
>on the number of players already registered and by the age group of the
>selected child. This is what the TIB_ComboBox selection values should
>reflect(i.e.: "Soccer Field Name (5 players)"), but I only want the soccer
>field name to be saved in the table. This is why I have to dynamically
>populate the drop-down list for TIB_ComboBox using Items and ItemValues.

If the soccer fields are not defined in their own table, then a TIB_LookupCombo is the wrong control to choose, as it is a specialised control for linking two datasets in a KeySource-Lookup relationship.

Use a TIB_Combobox. Link its Datasource property to the main query and then link its Datafield property to the SoccerFieldName column of the query.

You populate the Items of TIB_Combobox as you prefer (just like a native VCL TDBComboBox).

hth

Helen

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________