回复 6楼 hu9jj
我写的代码:
n=This.value
do case
case n=1
select all from ThisForm.grd输水干渠表 where 污染物名称 == "铅"
thisform.refresh
case n=2
select all from ThisForm.grd输水干渠表 where 污染物名称 == "苯酚"
thisform.refresh
endcase
但是运行后总是弹出一个对话框,让你自己选择是哪个表格,然后就改了代码
n=This.value
do case
case n=1
select all from ThisForm.grd输水干渠表 where 污染物名称 == "铅" into cursor temp
thisform.grid1.recordsourcetype=1
thisform.grid1.recordsource=temp
case n=2
select all from ThisForm.grd输水干渠表 where 污染物名称 == "苯酚" into cursor temp
thisform.grid1.recordsourcetype=1
thisform.grid1.recordsource=temp
endcase
thisform.refresh
但是还是不行,求大神指点一下!