I want to thank Potinenip for his questions on searching Real Estate and DM for his excellent answers. <br>I need to take it one step farther. Right now a user enters price range, bedrooms, baths, and city. The output is great, no problems with that (code at bottom of message), but I also need to be able to have it sort by city alone, or price range or any combination of the above. Every time I tried a <CFIF> statement it just wouldn't work and stalled on the 'price'. Where do I go from here to be able to sort by one or more variables without having to input them all?<br><br><cfswitch expression="#form.searchprice#"><br><CFCASE value="1"><br><cfset low = 0><br><cfset high = 9000000><br></cfcase><br><br><CFCASE value="2"><br><cfset low = 1><br><cfset high = 75000><br></cfcase><br><br><CFCASE value="3"><br><cfset low = 75001><br><cfset high = 100000><br></cfcase><br><br><CFCASE value="4"><br><cfset low = 100001><br><cfset high = 150000><br></cfcase><br><br><CFCASE value="5"><br><cfset low = 150001><br><cfset high = 200000><br></cfcase><br><br><CFCASE value="6"><br><cfset low = 200001><br><cfset high = 9000000><br></cfcase><br><br></cfswitch><br><br><cfparam name="City" default=""><br><cfparam name="bedrooms" default="0"><br><cfparam name="bathrooms" default="0"><br><br><CFQUERY Datasource="ronbrown" Name="homes"><br>Select *<br>From resident<br> WHERE price between #low# and #high# <br> and Bedrooms >= #bedrooms#<br> and bathrooms = #bathrooms#<br> and city = '#city#'<br> order by price<br></CFQuery>