•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 392,001 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,197 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 2215 | Replies: 0
![]() |
•
•
Join Date: May 2004
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
I am trying to select the number of rooms from my database but want it so the user can select a minimum or exact number.
This is a snippet of the code on my search page
<tr><td>Number Of Bedrooms:
<td>
<SELECT NAME="REQUIREMENT">
<OPTION VALUE="AL">Minimum</OPTION>
<OPTION VALUE="EX">Exactly</OPTION>
</SELECT>
<select name="Bedrooms" size="1">
<option selected value="">-</option>
<option value="2">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select></td></tr>
This is a snippet of the code on my results page
IF Bedrooms <> "" THEN
SELECT CASE Requirement
CASE "AL" Bedrooms = Bedrooms + "and BEDROOMS >=" & BEDROOMS
CASE "EX" Bedrooms = Bedrooms + "and BEDROOMS =" & BEDROOMS
END SELECT
END IF
If Bedrooms <> "" Then
WhereClause = WhereClause & "Bedrooms = " & _
Bedrooms & " AND "
End If
Please help If you need more information please just ask i'm really strugling with this one.
Cheers
This is a snippet of the code on my search page
<tr><td>Number Of Bedrooms:
<td>
<SELECT NAME="REQUIREMENT">
<OPTION VALUE="AL">Minimum</OPTION>
<OPTION VALUE="EX">Exactly</OPTION>
</SELECT>
<select name="Bedrooms" size="1">
<option selected value="">-</option>
<option value="2">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select></td></tr>
This is a snippet of the code on my results page
IF Bedrooms <> "" THEN
SELECT CASE Requirement
CASE "AL" Bedrooms = Bedrooms + "and BEDROOMS >=" & BEDROOMS
CASE "EX" Bedrooms = Bedrooms + "and BEDROOMS =" & BEDROOMS
END SELECT
END IF
If Bedrooms <> "" Then
WhereClause = WhereClause & "Bedrooms = " & _
Bedrooms & " AND "
End If
Please help If you need more information please just ask i'm really strugling with this one.
Cheers
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
- memory management in wndows 2000 (Windows NT / 2000 / XP / 2003)
- Software Hunting. (Software Developers' Lounge)
- Sony pcv rs 420 (Troubleshooting Dead Machines)
- Boot Disks (Viruses, Spyware and other Nasties)
- opening pictures in a new window (JavaScript / DHTML / AJAX)
- FarCry Barely Runs at Dead Minimum Quality (ATI Radeon 9800 Pro) (Monitors, Displays and Video Cards)
- Set Accessibility Features for People Who are Blind or Who Have Low Vision in WinXP (Windows tips 'n' tweaks)
Other Threads in the ASP Forum
- Previous Thread: Need Help with ASP
- Next Thread: "ADODB Recordset error"


Linear Mode