Utilizza una variabile di comodo...
codice:sql = "SELECT * FROM tabella" txt = "" if campo1 &"[]" <> "[]" then txt = "campo1 = '"& campo1 &"'" end if if campo2 &"[]" <> "[]" then if txt <> "" then txt = txt &" AND" txt = txt &" campo2 = '"& campo2 &"'" end if ecc... if txt <> "" then sql = sql &" WHERE "& txt end if