我在form中应用了一个combo来选择部门表中的部门(属性已设置成readonly=真),在两个text中输入时间数值,在按了“确定”键后把text中的数值来修改统计表中的的时间,接着用combo1=""来清除combo为空白为接着选择部门做准备。可是运行退出后发现部门表中最后一个部门内容被替换成空白了,不知是什么原因?请高手赐教,谢谢了!
“确定”按钮中的代码如下:
SELECT bmbh
LOCATE FOR bm=ALLTRIM(thisform.combo1.Value )
bms=bm
SELECT 4
USE yagz EXCLUSIVE
sz1=thisform.text1.Value
sz2=thisform.text2.Value
IF thisform.combo1.Visible = .T.
bms=ALLTRIM(thisform.combo1.Value )
REPLACE ALL g2 WITH sz2 ,g3 WITH sz1 FOR a28=ALLTRIM(bms)
ELSE
REPLACE ALL g2 WITH sz2 ,g3 WITH sz1
ENDIF
thisform.combo1.Value=""
thisform.text1.Value =0
thisform.text2.Value =0
thisform.Refresh