查询命令出错大家看看什么问题
查询只有第一次时有结果,再几次都显示未找到相关记录,但退出以后再运行表单又能查一次,然后又不行了,麻烦各位看看这个代码有什么问题,谢谢t1=alltrim(thisform.text11.value)
t1=val(t1)
loca for t1>=val(发票起号) and t1<=val(发票止号)
LOCA FOR TRIM(发票代码)==TRIM(THISFORM.TEXT12.VALUE)
IF FOUND()
sele * from 发票信息 where t1>=val(发票起号) and t1<=val(发票止号) into cursor "详查表单"
THISFORM.TEXT1.VALUE=纳税人识别号
THISFORM.TEXT2.VALUE=纳税人名称
THISFORM.TEXT3.VALUE=发票种类代码
THISFORM.TEXT4.VALUE=日期
THISFORM.TEXT5.VALUE=本数
THISFORM.TEXT6.VALUE=纳税人税务机构代码
THISFORM.TEXT7.VALUE=修改日期
THISFORM.TEXT8.VALUE=发票起号
THISFORM.TEXT9.VALUE=发票止号
THISFORM.TEXT10.VALUE=法定代表人名称
ELSE
THISFORM.TEXT1.VALUE=""
THISFORM.TEXT2.VALUE=""
THISFORM.TEXT3.VALUE=""
THISFORM.TEXT4.VALUE=""
THISFORM.TEXT5.VALUE=""
THISFORM.TEXT6.VALUE=""
THISFORM.TEXT7.VALUE=""
THISFORM.TEXT8.VALUE=""
THISFORM.TEXT9.VALUE=""
THISFORM.TEXT10.VALUE=""
messagebox("未找到相关记录!",64,"提示")
ENDIF
THISFORM.TEXT1.REFRESH
THISFORM.TEXT2.REFRESH
THISFORM.TEXT3.REFRESH
THISFORM.TEXT4.REFRESH
THISFORM.TEXT5.REFRESH
THISFORM.TEXT6.REFRESH
THISFORM.TEXT7.REFRESH
THISFORM.TEXT8.REFRESH
THISFORM.TEXT9.REFRESH
THISFORM.TEXT10.REFRESH
THISFORM.TEXT11.REFRESH
THISFORM.TEXT12.REFRESH