Subject | Re: [IBO] Lookupcombobox question |
---|---|
Author | Helen Borrie |
Post date | 2001-07-07T16:39:08Z |
At 03:21 PM 07-07-01 +0000, you wrote:
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
_______________________________________________________
>If you are interested I can E-Mail you my application and theNo, thank you, Johan, that won't be useful.
>database. It is about 8Mb total.
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
_______________________________________________________