Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the deal with Combos?
Message
From
07/10/1999 21:17:07
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00273965
Message ID:
00274033
Views:
34
>Until now I have always used combos as dropdown lists. Now I am trying to use one as a dropdown combo. I have tried RowSourceType as SQL but abandoned that since I can not update the cursor with a new item. Now the RST is an array stored as a parent form property. The array is created successfully by selecting StaffName from my staff table. I then scan the array to see if the current value of the ControlSource is a member of the array. If not I call the AddItem method to dimension the array to add 1 row. I populate the new row with the passed value.
>
>The problem is, if the current data was not in the list, the combobox value is blanked instead of setting its value to the data value from the ControlSource. What are the tricks to keeping and saving data values that are not part of the combo's list?
>
>TIA!

It's enough to set Combo.Displayvalue=mytable.myfield in some place. The dumb one is form.refresh method.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform