vf代码出错

来源:百度知道 编辑:UC知道 时间:2024/05/22 20:27:33
xh=thisform combo1.value
thisform commandgroup1.command 2.enable=.F.
thisform grid1.recordsource='query4.qpr'
thisform commandgroup1.command 2.enable=.T.
thisform refresh
执行后说有不能识别的短语或关键字
什么是嵌套错误

command 2不能有空格。
嵌套错误,是指IF ... ENDIF, DO WHILE <条件> ... ENDDO,
SCAN ... ENDSCAN, FOR ... ENDFOR 必须成对出现,且不能交叉使用,如:
DO WHILE .T.
...
IF A>B
? A
ELSE
? B
ENDDO
ENDIF
这就是嵌套错误,ENDIF要放在ENDDO的前面。