locate for 查询问题
cbb1=trim(thisform.combo1.value)
LOCATE FOR allt(gb2010.dw)==allt(cbb1)
IF found()
report form grqz.frx to printer prompt preview for allt(gb2010.dw)==allt(cbb1)
else
=messagebox( "请返回!",48+0+0,"提示")
endi
换成下面的就不行?
cbb1=trim(thisform.combo1.value)
LOCATE FOR allt(gb&c.dw)==allt(cbb1)
IF found()
report form grqz.frx to printer prompt preview for allt(gb&c.dw)==allt(cbb1)
else
=messagebox( "请返回!",48+0+0,"提示")
endi
[解决办法]
LOCATE FOR allt(gb&c.dw)==allt(cbb1)
&c中的c是一个变量 ?
VFP中c是保留字
使用宏替换时,如果后面还有字符,就要多加一个.,如:
ctext = "1"
thisform.text&ctext..value
[解决办法]
LOCATE FOR allt(gb&c..dw)==allt(cbb1)
[解决办法]
注意红色部分
cbb1=Trim(Thisform.combo1.DisplayValue)
Locate For Alltrim(gb&c..dw)==Alltrim(cbb1)
If Found()
Report Form grqz.frx To Printer Prompt Preview For Alltrim(gb&c..dw)==Alltrim(cbb1)
Else
=Messagebox( "请返回!",48+0+0,"提示")
Endif