Information générale
Titre:
Set/Return combobox value
I have a dropdown combobox which has a rowsource of an array (two-dimensional). The contents of the combobox is fine. However, I am having problems trying to set the initial value of my combobox equal to the field of an existing record.
This is the code I am using to set the value of the combobox:
ln_pos = ASCAN(ga_tours, lc_tourname)
IF ln_pos > 0
ln_row = ASUBSCRIPT(ga_tours, ln_pos, 1)
ln_column = ASUBSCRIPT(ga_tours, ln_pos, 2)
ln_tour = AELEMENT(ga_tours, ln_row, ln_column)
IF ln_tour < 1 THEN
ln_tour = 1
ENDIF
ENDIF
ln_tour is the controlsource for my combobox. ln_tour contains the correct value for the equivalent array element, however, it does not change to this array element.
I have tried using boundto, value & displayvalue, & have not had any success.
TIA for any suggestions!
Suivant
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