Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COMBO BOX blues
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00118827
Message ID:
00118886
Views:
20
Kia,

First the bad news. If you try to open a second instance of that form youcode will blow up because of the PUBLIC array. That's why I suggested doing the select in the combo that uses the result and using a cursor instead of an array. The programming concept for this is encapsulation, you want the behavior and resources for a control to be encapuslated in that control as is possible. This accomplishes two goals, one the control is independent of any other controls, and two the code is easier to find a yaer form now when you have completely forgotten where the PUBLIC var is being declared and populated.

As for the combo now showing you the new array, that is because you need to call the combo's Requery method when you change its rowsource. By doing the select in the requery you simply call teh combo's requery and it both changes the rowsource and refreshes the cvombo with the new values in one operation.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform