Subject Re: [IBO] Lookupcombobox question
Author Helen Borrie
At 03:21 PM 07-07-01 +0000, you wrote:

>If you are interested I can E-Mail you my application and the
>database. It is about 8Mb total.


No, thank you, Johan, that won't be useful.

About all that's left to suggest is that you make your lookup dataset as follows:
SELECT MODELNAME, MODELNAME AS MODEL_NAME
FROM MODELS;

and include a subselect in the parent query

SELECT ...., MODEL,
(SELECT MODELNAME FROM MODELS
WHERE MODELS.MODELNAME=STOCK.MODEL)
AS M_DESCRIPTION
FROM STOCK....

The keylinks for the Models lookup would be

MODELNAME=STOCK.MODEL

and you could try a KeyDescLinks entry of

MODEL_NAME=STOCK.M_DESCRIPTION

**If** the calculated column in the lookup dataset will be accepted as a KeyDescLinks, at least this will give IBO distinct parameter names for implementing the "follow-me" behaviour. Otherwise, I guess I'm coming to the conclusion that it's not going to work where the key and the data are one and the same.

If it won't work, consider using a TIB_ComboBox instead, with SELECT MODELNAME FROM MODELS as your dataset. Load the list items during the lookup dataset's After Open event. With this control, you just bind it to the parent datasource and datafield. You can't embed it in the grid and KeyDescLinks are not used.

Regards,
Helen




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