Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Box Problems
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00124164
Message ID:
00124186
Views:
21
>LOCAL lnACnt && set local variable for array counter.
>
>lnACnt = 1 && initialize variable
>
>gcDeptNo = THISFORM.cboDept.VALUE
>
>IF !EMPTY(THISFORM.cboDept.VALUE)
>*--Redefine group array pertaining to the department chosen
> SELECT DISTINCT snag_temp.ass_group ;
> FROM snag_temp ;
> WHERE snag_temp.ass_l_dept = gcDeptNo ;
> INTO ARRAY gacGroupArray
> THISFORM.cboGroup.ENABLED = .T. &&Enable combo box
> THISFORM.cboGroup.CLEAR &&Clear combo box
>*--Load array into combo box
> FOR lnACnt = 1 TO ALEN(gacGroupArray)
> THISFORM.cboGroup.ADDITEM
> lnACnt = lnACnt + 1
> ENDFOR
>ELSE
> THISFORM.cboGroup.ENABLED = .F.
>ENDIF
>
>THISFORM.REFRESH()
>
>I believe I'm thinking in VB, but isn't the additem method similar.
>
>Thanx in advance.

Perry,

First your FOR loop is only processing every other element in your array, second you need to tell additem what to add as in;

Combobox.AddItem(")
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform