Subject Re: [IBO] IB_lookupcombo: I'm missing someething.
Author Helen Borrie
At 11:46 PM 13/07/2005 -0400, you wrote:
>Thanks for all of you help getting my double quoted table names
>straightend out. I recreated my database and things seem to be working
>much better.
>I still am having trouble with the IB_lookupCombo in a grid.
>Everything seems to be working fine ... except:
>When I go into the lookup combo, it defaults to an empty string (not the
>value I expect it to be linked to), and when the dropdown appears, it
>shows the whole row of the lookup table.

The dropdown is an ib_grid. It will show all of the fields that you don't
make invisible using the FieldsVisible property.

>Query1 and Datasource1 are the main table that has the following fields
>ID, CATEGORY, MYSTUFF (where mystuff is the subqueried field based on
>the foreign key CATEGORY)
>Query2 and Datasource2 are the lookuptable with fields
>The TIB_LOOKUPCOMBO has a datasource = IB_Datasource2.
>When I click in the dropdown, I get both fields LOOKUPNAME,lookupv in
>the drop down,
> e.g.
> bob 1
> ralph 2
>but nothing is in the editable portion of the dropdown by default (it
>does not look like it is hooked to category).

1) that the column CATEGORY in the Query1 table is a foreign key to the
column LOOKUPV in the Query2 table, and the column MYSTUFF is the
LOOKUPNAME value returned from a subquery correlating Query1.CATEGORY with
2) that you have eliminated all of those quoted identifiers from your

KeyLinks for Query2 should be:


KeyDescLinks for Query2 should be:

KeySource for Query2 should be Datasource1.

>When I click on an element in the dropdown, category does not change.

Do you understand that Query1 has to be in Edit mode for a change to be
possible? In Browse mode, if the links are properly set up, the edit box
part of the ib_lookupcombo will scroll as you scroll the Keysource dataset.

>If I change the numeric category field by hand, the change will take,
>but the combobox is not refreshed.

Make sure that

1. KeyLinks and KeyDescLinks are right - and that they are on Query2, not

2. You don't put any spaces around the "equals" signs in these links.

3. That the value on the left of the KeyLink is unique in the lookup dataset.

3. You don't have any mastersource/masterlinking relationships set up
between these two datasets.