into table a
这里的a有问题
在vfp中,a可以是个工作区
例如
select a
可能你认为这个命令的作用是选择a表
可我也可以认为是选择a工作区
这可能并不是导致grid不显示的关键原因
thisform.grid1.recordsource='select * from cpb where xih=thisform.text1.value into table a'
thisform.grid1.recordsource='a'
这两句修改成
select * from cpb where xih=thisform.text1.value into cursor temp
thisform.grid1.recordsource = 'temp'
thisform.grid1.recordsourcetype = 1
再试试