微调上限的逻辑
程序代码: PROCEDURE howManyLine.upClick
IF thisform.howManyLine.value<=4
*!* MESSAGEBOX("1单内最多只能有4项材料入账",64,"操作提示!")
*!* ELSE
clflCbxNum="clflCbx"+ALLTRIM(STR(thisform.howManyLine.value))
clmcCbxNum="clmcCbx"+ALLTRIM(STR(thisform.howManyLine.value))
jldwCbxNum="jldwCbx"+ALLTRIM(STR(thisform.howManyLine.value))
ssslTxtNum="ssslTxt"+ALLTRIM(STR(thisform.howManyLine.value))
grdjTxtNum="grdjTxt"+ALLTRIM(STR(thisform.howManyLine.value))
grjeTxtNum="grjeTxt"+ALLTRIM(STR(thisform.howManyLine.value))
bzdjTxtNum="bzdjTxt"+ALLTRIM(STR(thisform.howManyLine.value))
bzjeTxtNum="bzjeTxt"+ALLTRIM(STR(thisform.howManyLine.value))
cjTxtNum="cjTxt"+ALLTRIM(STR(thisform.howManyLine.value))
bgddCbxNum="bgddCbx"+ALLTRIM(STR(thisform.howManyLine.value))
thisform.addobject('&clflCbxNum','comboBox')
thisform.addobject('&clmcCbxNum','comboBox')
thisform.addobject('&jldwCbxNum','comboBox')
thisform.addobject('&ssslTxtNum','textBox')
thisform.addobject('&grdjTxtNum','textBox')
thisform.addobject('&grjeTxtNum','textBox')
thisform.addobject('&bzdjTxtNum','textBox')
thisform.addobject('&bzjeTxtNum','textBox')
thisform.addobject('&cjTxtNum','textBox')
thisform.addobject('&bgddCbxNum','comboBox')
Thisform.Arrange
ELSE
MESSAGEBOX("1单内最多只能有4项材料入账",64,"操作提示!")
ENDIF
ENDPROC 上限是4,已经是4的时候,再点一下,提示同名类,为什么不转到ELSE呢?
还是需要另设一个FORM的属性,协助限制上限?









