汉字为字段名称:
查询的汉字输入到sle_qwss中
long ll_found_row
string qwssx,ll_filter
ulong ll_len
qwssx=trim(sle_qwss.text)
ll_len=len(qwssx)
ll_filter="mid(来源,pos(来源,'"+qwssx+"')," +string(ll_len)+")='"+qwssx+"'" &
+" or "+"mid(植物形态,pos(植物形态,'"+qwssx+"')," +string(ll_len)+")='"+qwssx+"'" &
+" or "+"mid(生长地,pos(生长地,'"+qwssx+"')," +string(ll_len)+")='"+qwssx+"'"&
+" or "+"mid(采制,pos(采制,'"+qwssx+"')," +string(ll_len)+")='"+qwssx+"'"&
+" or "+"mid(化学成分,pos(化学成分,'"+qwssx+"')," +string(ll_len)+")='"+qwssx+"'"&
+" or "+"mid(性味,pos(性味,'"+qwssx+"')," +string(ll_len)+")='"+qwssx+"'"&
+" or "+"mid(功能主治,pos(功能主治,'"+qwssx+"')," +string(ll_len)+")='"+qwssx+"'"&
+" or "+"mid(附注,pos(附注,'"+qwssx+"')," +string(ll_len)+")='"+qwssx+"'"
dw_1.setfilter(ll_filter)
dw_1.filter()
dw_2.setfilter(ll_filter)
dw_2.filter()
if ll_len<=0 then
dw_2.object.来源.background.color=rgb(255,255,255)
dw_2.object.植物形态.background.color=rgb(255,255,255)
dw_2.object.生长地.background.color=rgb(255,255,255)
dw_2.object.采制.background.color=rgb(255,255,255)
dw_2.object.化学成分.background.color=rgb(255,255,255)
dw_2.object.性味.background.color=rgb(255,255,255)
dw_2.object.功能主治.background.color=rgb(255,255,255)
dw_2.object.附注.background.color=rgb(255,255,255)
dw_2.object.来源.color=rgb(0,0,0)
dw_2.object.植物形态.color=rgb(0,0,0)
dw_2.object.生长地.color=rgb(0,0,0)
dw_2.object.采制.color=rgb(0,0,0)
dw_2.object.化学成分.color=rgb(0,0,0)
dw_2.object.性味.color=rgb(0,0,0)
dw_2.object.功能主治.color=rgb(0,0,0)
dw_2.object.附注.color=rgb(0,0,0)
return
end if
ll_found_row=dw_1.find(ll_filter,1,9999)
if ll_found_row>0 then
dw_1.setredraw(false)
dw_1.scrolltorow(ll_found_row)
dw_1.setredraw(true)
dw_1.postevent("rowfocuschanged")
end if