Subject Lookup Doesn't work properly
Author jostost
I have a problem with a lookup combo that does not select the current
value of a record.

The select statement of the data file is:
SELECT PROVART.PROV
, PROVART.CVEART
, INVE01.DESCR AS NOMPROD
FROM PROVART
JOIN INVE01 ON PROVART.CVEART=INVE01.CLV_ART

The keylinks of this query is:
PROVART.PROV
PROVART.CVEART

The select statement of the lookup table (Art) is:
SELECT CLV_ART, DESCR
FROM INVE01

The keylinks of the lookup table is:
INVE01.CLV_ART=PROVART.CVEART

The KeyDescLinks is:
INVE01.DESCR=PROVART.NOMPROD

The KeySource is: dProvArt

I have a TIB_Grid of the provart table with a TIB_LookupCombo in it
called cbArt with the following properties:
DataSource = dArt
DisplayField = DESCR
CustomPopUp = grdArt

The behaviour Ia am getting is the following:

1) the PROVART grid display the code CVEART and the description
NOMPROD correctly.
2) When I click on the NOMPROD field on the grid, the lookup (arrow)
button appears and the field contents become <blank>, (blue) no text.
3) I click on the arrow button and a grid of the lookup table appears
with the values of the code (CLV_ART) and the description (DESCR),
but at the beginning of the table and not at the current value of the
PROVART table.

Another quirk is that the first time that I open the lookup grid, it
appears very narrow. If I close it and open it again, it appears with
the correct width but still not at the value of the data.

I have dedicated HOURS at this and cannot get it to work right. What
am I doing wrong?

Regards
Jay

Please advice me if you want images of the way it appears.