Is it possible to combine these 3 queries into 1:
'/////////////////////////////////////////////####################
If Status = “Sale” Then
sSQL = "SELECT * FROM tblProperty WHERE Status = ‘Sale’ AND (Beds >= " & beds & ") AND (price >= " & minprice & " AND price <= " & maxprice & “) “& QueryType &” “& QueryArea &” ORDER BY price ASC”
ElseIf Status = “Resale” Then
sSQL = "SELECT * FROM tblProperty WHERE Status = ‘Resale’ AND (Beds >= " & beds & ") AND (price >= " & minprice & " AND price <= " & maxprice & “) “& QueryType &” “& QueryArea &” ORDER BY price ASC”
Elseif Status = “both” Then
sSQL = "SELECT * FROM tblProperty WHERE (Beds >= " & beds & ") AND (price >= " & minprice & " AND price <= " & maxprice & “) “& QueryType &” “& QueryArea &” ORDER BY price ASC”
else
response.write “go back”
End If
'//////////////////////////////////
status value is coming from a form
Many Thanks