我要查询的是一个范围
代码如下:
SELECT zrqk
a=VAL(thisform.combo1.Value)
b=VAL(thisform.combo2.value)
c=VAL(thisform.combo3.Value)
d=VAL(thisform.combo4.value)
e=a+b/100
f=c+d/100
search1= "csrq> = "+ALLTRIM(STR(e))
search2= "csrq <= "+ALLTRIM(STR(f))
search=search1+ " and "+search2
SET FILTER TO
SET FILTER TO &search
COUNT TO rs
thisform.text4.Value =rs
thisform.list1.Requery
thisform.refresh
显示结果不正确,错误在哪里???
------解决方案--------------------------------------------------------
在VFP下 1/100=0.01非0,
年+ '. '+right( '0 '+月,2)转换成1976.01,将年、月转换字符型。