The following statement comes straight from my .IDC file:<br><br>+WHERE ((tblCodes.CompanyCode) = '%CompanyCode%') or <br>((tblCodes.CompanyName) like '%CompanyName%%%')<br><br>What I'd like it to do is enable the user to query for either Company Code or Company Name (two form fields on an HTML page). As written, it currently works fine when searching by Company Name, but returns all records in the database (Access 97) when searching by Company Code.<br><br>How can I get the database to give me only the Company Code I'm looking for?