Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

search variables in dreamweaver drop down box using ASP-VB

Status
Not open for further replies.

russellisaacb

Programmer
Jun 30, 2007
1
GB
am relative newcomer to ASP-VB and using Dreamweaver.

working on a dating agency site in Dreamweaver (ASP-VB). need multiple search criteria via drop down boxes i.e. age = AND hair colour = AND eye colour + etc.

all working fine passing variables to searchresult page with all known variables listed in each drop down (i.e. hair options = brown, black, blonde etc),

but

i need to add an option into each drop down box to specify "ANY". i.e if someone doesnt want to specify a hair colour it passes a variable which tells the dbase to retrieve everything for that field. otherwise users are forced into having to select a single criteria for each field.

guess ther must be something i can enter in the labels/values for this option to work - can anyone advise. very much appreciated.
 
There are a number of ways to do this. If you are building your sql query on the fly:
Code:
if eyecolorselection = "any" then
   ' do nothing
else
   sqlstring = sqlstring & "  AND table.eyecolor='" & eyecolorselection & "'"
endif

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top