Subject Re: [IBO] Lookupcombobox question
Author Geoff Worboys
> I have a table called "stock" that contains a field "Model".
> I have another table called "Models" that contains a list of
> valid models. How do I setup a lookupcombobox to display a
> dropdown list from the "Models" table and update the "model"
> field in the "stock" table. The field to display in the
> dropdown box is "Modelname" and this is also the value to
> update the stock table with.

Sounds like you are just getting started? Take a look at the various
tutorial/sample applications that come with IBO. There is also a
"Getting Started Guide" available for purchase from the ibobjects
website which I believe provides detailed explanation of the steps
involved.

The main thing to remember is that TIB_LookupCombo does not quite act
like other controls...

TIB_LookupCombo connects to the "lookup dataset". It does NOT connect
to the main dataset that you are editing. The TIB_LookupCombo simply
provides a selection capability to lookup records in the lookup
dataset.

The "lookup dataset" is simply a normal TIB_Query except that you
define the KeySource property to point the main datasource (where you
wish edit the foreign key value). It is the lookup dataset that edits
the main dataset field - via the specially defined KeyLinks. The
lookupcombo is simply used to move the lookup dataset row selection.

Hopefully this will give a start to understanding the examples a
little better.


Geoff Worboys
Telesis Computing