dim sql as string ="select * from tb where 1=1 "
dim s1 as string = ""
dim s2 as string = ""
dim s3 as string = ""
if not (textbox1.text="") then s1 = " and fld1 ='"& textbox1.text &"'"
if not (textbox2.text="") then s2 = " and fld2 ='"& textbox2.text &"'"
if not (textbox3.text="") then s3 = " and fld3 ='"& textbox3.text &"'"
dim sql as string ="select * from tb where 1=1 "
dim s1 as string = ""
dim s2 as string = ""
dim s3 as string = ""
if not (textbox1.text="") then s1 = " and fld1 ='"& textbox1.text &"'"
if not (textbox2.text="") then s1 = " and fld2 ='"& textbox2.text &"'"
if not (textbox3.text="") then s1 = " and fld3 ='"& textbox3.text &"'"