i use one listbox for selecting fields from table and another listbox for oprator like"include,greater than ,less than"and so on,still another textbox for<BR>inputing querying value.finnally,in the<BR>click event of the commandbutton,combined<BR>strings got from those controls to a whole sql string and using recordset.open newsqlstring,dsn to retrieve.however be told that "wrong type parameter or out of range","[ODBC] syntax wrong near alike%%" how could i construct a efficent dynamic querying?