你是想用tbl_set_selected_cell来选取ID满足那个SELECT语句的CELL?
如果ID是可以从数据库中获取,那就好办了:
1、执行这个SQL获取该ID值(参考论坛里数据库连接、SQL执行相关的帖子),放到某个变量里,比如 nID = returned value
2、tbl_set_selected_cell ("dw_1", "id=" & nID, "selectflag"); 如果ID相关的列在表里面的列名就是ID的话
db_connect(sesion,"dsn=com",10) #com为数据库名称
db_execute_query(sesion,"select top 1 id from tbxorg order by id desc",nid);#nid为接收sql的值
db_get_field_value(sesion,"xid","nid");#赋值给xid
tbl_set_selected_cell ("dw_1", "xid="&nid, "selectflag");#