How to make search form

Results 1 to 2 of 2

Thread: How to make search form

  1. #1
    Stevie Mulia Guest

    Default How to make search form

    I&#039m a new ASP programmer and I am making a search form using 2 drop down menu and one text box field. Then, I have to search the MS Access database using that search form. The question is how to make a combination of the search fields. Do I have to make 9 combination of NESTED IF.. statements and 9 SQL statements or there is something easier.<BR>(Because if somebody else making say.. 10 fields, he would have to make 100 NESTED IF.. combination and 100 SQL Statements ... That&#039s why I thought there might be an easier way)<BR><BR>I would really appreciate any feed back.<BR><BR>My email is <BR>(if you want to respond to it privately)<BR><BR>Thank You Very Very Very much for your time<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: How to make search form

    You need to use probably one or two SQL statements with variables. Use variables so that the different values can be searched for. <BR><BR>Example<BR>variable1=request.form("variabl e1")<BR>variable2=request.form("variable2")<BR>sql ="Select * from table where column1=&#039"&variable1&"&#039 and column2=&#039"&variable2&"&#039"<BR><BR>If each value from the page before requires you to search a different column, you can use the "or" function instead of "and" if there is not much crossover between columns.<BR><BR>Good Luck<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts