General information
Title:
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!
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only