I can try to help you out now if you'd like.
You've got two options:
1) You can add a value of zero to your tables for "ANY"
2) You can add code specific which tells it to ignore it.
For the code to ignore it,
Right before your while not *.EOF lines, add an option line which says something like this:
<option value="any">Any</option>
Then in the page which reads these options, have code something like this:
Code:
<%
dim mnuMLS, mnuBed, strSQL, WhereSQL
dim strStr, strInt
strStr = "string"
strInt = "integer"
mnuMls = Request.Form("mnuMLS")
mnuBed = Request.Form("mnuBed")
WhereSQL = ""
if mnuMLS <> "any" and mnuMLS <> "" then
WhereSQL = BuildWhere("", "mnuMLS", strStr, mnuMLS)
end if
if mnuBed <> "any" and mnuBed <> "" then
WhereSQL = BuildWhere("", "mnuMLS", strInt, mnuMLS)
end if
StrSQL = "SELECT * FROM TABLENAME" & WhereSQL
function BuildWhere(IncomingSQL, FieldName, FieldType, FieldValue)
dim strSQL
if IncomingSQL = "" then
strSQL = " WHERE "
else
strSQL = IncomingSQL & " AND "
end if
strSQL = strSQL & FieldName & " = "
if FieldType = "string" then
strSQL = strSQL & "'" & FieldValue & "'"
else
strSQL = strSQL & "'" & FieldValue & "'"
end if
BuildWhere = strSQL
end function
%>
Bookmarks