Subject | problem with ib_lookupCombo and new values |
---|---|
Author | hypmarie23 |
Post date | 2006-05-14T18:03:44Z |
I am using an ib_lookupCombo embedded in an ib-grid.
It worked ok : I had my description field : (Famille_vegetale)
corresponding to the chosen id_famille correctly displayed in the
grid when I chose an item from my lookupcombo.
But I complicated things : I added a popupmenu opening a
tib_lookupdialog in order to create a new Famille_vegetale when it
does not exist in the lookupcombo.
But the new description field (Famille_vegetale) keeps displayed
only as long as I remain on the modified row.
Where can I put code to update this field ?
The sql of my main query is the following :
SELECT ESPECES.ID_ESPECE
, ESPECES.ID_FAMILLE
, ESPECES.NOM_ESPECE
, FAMILLE_VEGETALE
, ESPECES.UNITE_ESPECE
, ESPECES.PRIX_MOYEN
FROM ESPECES
JOIN FAMILLES
ON (ESPECES.ID_FAMILLE = FAMILLES.ID_FAMILLE)
The key relation is ESPECES.
In my datalookupquery Ihave the following sql :
SELECT ID_FAMILLE
, FAMILLE_VEGETALE
FROM FAMILLES
The links seem ok.
And I have put code on the afterscroll method of my dadalookup
query :
"
if IB_QueryEspece.State in [dssEdit, dssInsert] then
IB_QueryEspece.FieldByName('FAMILLE_VEGETALE').AsString :=
IB_QueryFvegetale.FieldByName('FAMILLE_VEGETALE').AsString;
end;
"
What else remains to be done ?
If someone could tell me ...
It worked ok : I had my description field : (Famille_vegetale)
corresponding to the chosen id_famille correctly displayed in the
grid when I chose an item from my lookupcombo.
But I complicated things : I added a popupmenu opening a
tib_lookupdialog in order to create a new Famille_vegetale when it
does not exist in the lookupcombo.
But the new description field (Famille_vegetale) keeps displayed
only as long as I remain on the modified row.
Where can I put code to update this field ?
The sql of my main query is the following :
SELECT ESPECES.ID_ESPECE
, ESPECES.ID_FAMILLE
, ESPECES.NOM_ESPECE
, FAMILLE_VEGETALE
, ESPECES.UNITE_ESPECE
, ESPECES.PRIX_MOYEN
FROM ESPECES
JOIN FAMILLES
ON (ESPECES.ID_FAMILLE = FAMILLES.ID_FAMILLE)
The key relation is ESPECES.
In my datalookupquery Ihave the following sql :
SELECT ID_FAMILLE
, FAMILLE_VEGETALE
FROM FAMILLES
The links seem ok.
And I have put code on the afterscroll method of my dadalookup
query :
"
if IB_QueryEspece.State in [dssEdit, dssInsert] then
IB_QueryEspece.FieldByName('FAMILLE_VEGETALE').AsString :=
IB_QueryFvegetale.FieldByName('FAMILLE_VEGETALE').AsString;
end;
"
What else remains to be done ?
If someone could tell me ...