THISFORM.GRID1.RECORDSOURCE=''
SELE * FROM tabels INTO CURSOR stable
IF _TALLY>0
THISFORM.GRID1.RECORDSOURCE='stable'
ELSE
MESSAGEBOX('没有符合要求的记录!')
ENDIF
THISFORM.GRID1.REFRESH
回答美少女的问题如下:假设grid名字叫grid1
use your_table alias ccc
thisform.grid1.recordsourcetype="alias"
thisform.grid1.recordsource="ccc"
zap
append from something
thisform.grid1.refresh
如果再显示别的表:
thisform.grid1.recordsourcetype="table"
thisform.grid1.recordsource="another_table"
thisform.grid1.refresh
回答最上面那位哥们的问题:
想以后还用查询结果,就另存一个表:比如这样实现
select * from tablename into tablename2 where fieldname=thisform.text1.value
thisform.grid1.recordsourcetype="table"
thisform.grid1.recordsource="tablename2"
thisform.grid1.refresh
这样以后tablename2总是存在的.可以重复利用,又经济又环保,还砸不坏花花草草。。。。
THISFORM.GRID1.RECORDSOURCE=''
SELE * FROM tabels INTO CURSOR stable
IF _TALLY>0
THISFORM.GRID1.RECORDSOURCE='stable'
ELSE
MESSAGEBOX('没有符合要求的记录!')
ENDIF
THISFORM.GRID1.REFRESH