Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Network:
Windows 2003 Server
Hi Tamar,
- the combo's row source is an array that is a property of the combo
- it's bound to a field in a cursor with the binding happening on Col 2 of the array (Col 1 is the display name)
- the array is not filled in until the form's .Init() code because I have to wait until then to get a parameter that then determines the array contents
- after populating the array, I issue .Requery() to bring the rows into the combo and then .Refresh() to get the display up to date; I had assumed the .Refresh() would have reset both .ListIndex and .ListItemID
- in this case, if I start up the form with the bound field at it's default (zero), since there is no corresponding entry in the array with that value, I would have assumed that .ListItemID would have been -1 and .ListIndex = 0; ListIndex is correct but ListItemID is a 1; the display is correct i.e. a blank row shows and if you click the down arrow on the control, it shows that no row has been chosen yet.
- I was getting incorrect results because .ListItemID was incorrect; the code now checkes both .ListItemID and .ListIndex and both have to be greater than zero - but that's only to handle the problem, should not really have to do that.
Thanks,
Albert
>
>Remind me. You're set ControlSource to the relevant field? Refreshed the combo?
>
>Tamar
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement