multiple drop down boxes

Results 1 to 3 of 3

Thread: multiple drop down boxes

  1. #1
    Join Date
    Dec 1969

    Default multiple drop down boxes

    hi...<BR> i had problems on how to do multible drop down boxes and someone gave me the below sql <BR>strSQL = "SELECT Student_Name FROM STUDENT WHERE Left(theName,1) IN ("Request("nameStartsWith")&")"<BR><BR>but i dont understand what Left(theName,1)IN ("Request("nameStartsWith")&")" stands for???<BR><BR>can anyone please tell me...

  2. #2
    Join Date
    Dec 1969

    Default RE: multiple drop down boxes

    &nbsp;<BR><BR>Left(theName,1) returns the first letter in a column named theName<BR><BR>the in predicate is used to check if a value is contained in a list of values. I.e. if Request("nameStartsWith") contains a list of letters such as &#039;C&#039;,&#039;D&#039;,&#039;Q&#039; the query would return all records where theName starts with either C D or Q

  3. #3
    Join Date
    Dec 1969

    Default A mistake in that...

    You left out an & character:<BR><BR>strSQL = "SELECT Student_Name FROM STUDENT WHERE Left(theName,1) IN ("[hl="yellow"] & [/hl]Request("nameStartsWith") & ")"<BR><BR>So that says: Get the first character of each name <BR> LEFT(theName,1)<BR>and then look in the *LIST* that was given via the Request (example<BR> &#039;a&#039;,&#039;b&#039;,&#039;c&#039;,&#039;d& #039;,&#039;e&#039;<BR>from the other day) to see if that first letter matches any of the ones in the list.<BR><BR>But you were *ALSO* told that using LIKE might be easier. Remember?<BR><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