求教:列表多选数字相加不正确
列表多选数字相加不正确,寻求帮助
程序代码:thisform.label1.caption = ""
thisform.label2.caption = ""
FOR i=1 TO thisform.list2 .listcount
IF thisform.list2 .selected(i)
thisform.label1.caption = thisform.label1.caption + thisform.list2.List(i,1)
thisform.label2.caption = TRANSFORM(VAL(thisform.label2.caption) + VAL(thisform.list2.List(i,2)))
ENDIF
ENDFOR