icecr3amc4k3
Programmer
hello everyone i have a little problem i want to output like in the picture but i don't know how
1.Limit the number of "+" loops
2. and making loops also appear in text 3 and 4 as in list box and combo box
i have a copy of the code i made
a = VAL(thisform.text1.value)
b = VAL(thisform.text2.value)
DO WHILE a <= b
IF a % 2 = 0 then
thisform.combo1.AddItem(ALLTRIM(STR(a)))
thisform.combo1.AddItem(ALLTRIM("+"))
thisform.list1.AddItem (ALLTRIM(STR(a)))
thisform.list1.AddItem(ALLTRIM("+"))
thisform.text3.Value = (ALLTRIM(STR(a)))
a = a + 2
ELSE
thisform.combo1.AddItem(ALLTRIM(STR(a)))
thisform.combo1.AddItem(ALLTRIM("+"))
thisform.list1.AddItem (ALLTRIM(STR(a)))
thisform.list1.AddItem(ALLTRIM("+"))
a = a - 1 + 2
thisform.list1.RemoveItem(1)
thisform.combo1.RemoveItem(1)
ENDIF
ENDDO
1.Limit the number of "+" loops
2. and making loops also appear in text 3 and 4 as in list box and combo box
i have a copy of the code i made
a = VAL(thisform.text1.value)
b = VAL(thisform.text2.value)
DO WHILE a <= b
IF a % 2 = 0 then
thisform.combo1.AddItem(ALLTRIM(STR(a)))
thisform.combo1.AddItem(ALLTRIM("+"))
thisform.list1.AddItem (ALLTRIM(STR(a)))
thisform.list1.AddItem(ALLTRIM("+"))
thisform.text3.Value = (ALLTRIM(STR(a)))
a = a + 2
ELSE
thisform.combo1.AddItem(ALLTRIM(STR(a)))
thisform.combo1.AddItem(ALLTRIM("+"))
thisform.list1.AddItem (ALLTRIM(STR(a)))
thisform.list1.AddItem(ALLTRIM("+"))
a = a - 1 + 2
thisform.list1.RemoveItem(1)
thisform.combo1.RemoveItem(1)
ENDIF
ENDDO