dO SOME THING LIKE THIS, Create a string and put your sql query in to it and then execute it. This is how i do in Ado Record set. Just try this in your application.
for instance if there are 4 or more options you have give to the user what i do is.
strSql = soemSqlQuerry & Where condition & more where condition
and then exequte this sql. I dont use command object.