K
kantaguai
Unregistered / Unconfirmed
GUEST, unregistred user!
SQLALL:='';<br> if edit_cate.Text<>'' then<br> arrstr[1] := '(category like'''+edit_cate.Text+'%'+''')';<br> if edit_custname.Text<>'' then<br> arrstr[2] := '(company like'''+'%'+edit_custname.Text+'%'+''')';<br> if edit_address.Text<>'' then<br> arrstr[3] := '(address like'''+'%'+edit_address.Text+'%'+''')';<br> for i:=1 to 3 do<br> if arrstr<>'' then<br> SQLAll := SQLAll + 'and' +arrstr;<br> SQLStr := 'select * from [custom] where ';<br> with frm_data.Qry_cust do<br> begin<br> close;<br> SQL.Text := SQLStr;<br> Open;<br> end;