Print Page | Close Window

editing my search form

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=12056
Printed Date: 28 March 2026 at 4:56pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: editing my search form
Posted By: Lucent
Subject: editing my search form
Date Posted: 06 October 2004 at 6:24pm
I'm trying to add more search functions to my search form, but I just cant figure out what went wrong.
 
Access Database
Table Name: Products
Field: custom1     content1
         Color          Blue
         Color          Red
         Color          Blue
         Color          White
         Color          Red
         Color          Black
 
I need to create a pull down selection list what list all the value in the content1 fields in acending order and without duplicating.
 
Pull down selection list shows
Black
Blue
Red
White
 
This is what I did, but it didn't work.
 
<%mySQL="Select * from Products order by Content1 asc"
                          set rstemp4=connTemp.execute(mySQL)
                          if not rstemp4.eof then%>
                          <tr>
                           
<td><font size="2">Color</font></td>
                            <td width="70%"><select name="Content1">
                            <option value="0" selected>All</option>
                            <%do while not rstemp4.eof%>
                            <option value="<%=rstemp4("Custom1")%>"><%=rstemp4("Cont ent1")%></option>
                            <%rstemp4.MoveNext
                            loop%>
                            </select></td>



Replies:
Posted By: Phat
Date Posted: 06 October 2004 at 10:10pm
what is the error give some more details...


Posted By: Lucent
Date Posted: 08 October 2004 at 2:48pm

it didn't give me any error, simiply as nothing changed

actually, I'm trying a different approch right here..

Table Name: Products

idProducts | Make1 | Model1 | Make2 | Model2 | Make3 | Model3
      3      3       240SX    3       300ZX    3       350Z
      4      3       300ZX   
      5      2       Supra    3       300ZX    1       Civic

============================================================ ===
Table Name: Makes

idMake | Make   |
   1     Honda
   2     Toyota
   3     Nissan

============================================================ ===

This is the way how the table was setup.

I want to make a search form that does 2 select pull down list

 1.One select pull donw list shows all the "Make" from talbe "Makes" in acs
 2.The other select pull down list shows all the "model1" + "model2" + "model3"
 with no duplicate value in the list

I tried to do this one, but I can only get the model select list to show up 1 field,
and the value in the select list shows duplicated value.


Both select lists are chained.

 When one make is selected, only car models under that particular make will show in
 the model pull down list.


And, search script that does the search like
 when I choose Toyota then Supra in the search from, it will go throught all the
 products and search for products with "Supra" in any of the "model1", "model2",
 or "model3" fields.

any help would be great. Thanks in advance!!




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net