,则你通过一定的手段从此表中取出其对应的主键列号为2;4;,然后又通过分解得出其列号为2、4,将其存到一个数组中去,然后:
string ls_str[]
long ll_col[],ll_pos
ll_col=wf_获取拆分主键列号()
for ll_pos=1 to upperbound(ll_col[])
ls_str=dw_1.getitemstring(dw_1.getrow(),ll_pos)
...//此处获取当前dw_1中选中行的各主键列的值;
ls_colname=dw_2.Describe("#1.name"))
if ll_pos<>upperbound(ll_col[]) then
ls_cond=ls_colname+"='"+ls_str+"' and "
else
ls_cond=ls_colname+"='"+ls_str+"'"
end if
next
ll_pos=dw_2.find(ls_cond,1,dw_2.rowcount())
if ll_pos<>0 then
dw_2.setrow(ll_pos)
dw_2.scrolltorow(ll_pos)
else
messagebox("info","未找到数据!")
end if