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:
00118852
Views:
17
>Kia,
>
>In the requery method of the second combo put the following code;
>
>
>SELECT ... FROM ... WHERE Field = THISFORM.Combo1.Value INTO CURSOR MyResult
>THIS.RowSourceType = 2 && Alias
>THIS.RowSource = "MyResult"
>THIS.Refresh()
>
>
>That should solve your problem. The reason you are having a problem is that the
>valid event of the first combo runs, it creates an array and then it ends and the array goes out of scope and disappears. Your second combo can't see the array that the first combo built. The solution I recommended is using a cursor and the building of the list for the second combo is IN the seocnd combo and not some other object.


Jim;
Thankyou for your reply. I resolved the issue by trying "one" more thing!!!!
I defined the array as Public in the form's init, which works fine. But I found out that if the array size changes programitcally, the Combo Box 'NumberOfElement' doesn't update, and I must issue a ThisForm.cboMyCombo.NumberOfElemets = ALEN(aMyArray)

Regards

Kia Harirchian
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform