Drop Down List

Results 1 to 2 of 2

Thread: Drop Down List

  1. #1
    Charles Guest

    Default Drop Down List

    I have the drop down list populated from my Access database but cannot get the sql query to work that the drop down list form posts to. I get the error message:<BR><BR>ADODB.Recordset error &#039 800a0cc1&#039 <BR><BR>Item cannot be found in the collection corresponding to the requested name or ordinal<BR><BR>Here is the code from the SQL query that the form posts to:<BR><BR>&#060;%<BR>manufacturer = Request.Form("manufacturer")<BR><BR>strSQL = "select Manufacturer, PartNumber, ProductTagLine, EsiPrice, Msrp, qoh from webproducts where manufacturer = &#039" & manufacturer & "&#039"<BR>Set objRS = objConn.Execute(strSQL)<BR> <BR>Do while not objRS.eof <BR>%&#062;<BR><BR>Thanks in advance for your help.

  2. #2
    Join Date
    Dec 1969

    Default RE: Drop Down List

    Not sure if this will help but here is some code that I am using that is working great for me:<BR><BR>varState=Request.querystring("statebox" )<BR>sqltext="SELECT * FROM SSTP1 "<BR>sqltext=sqltext & " WHERE State IN(&#039" & varState & "&#039) ORDER BY Institution;"<BR><BR>This is a drop down box which searches the database for states.<BR><BR>Notice Request.querystring("statebox") "statebox" is the name of my dropdown box<BR><BR>Also, I have parens () around my variable.<BR><BR>Equal sign might also be giving you trouble. Are you looking for a number or text?<BR><BR>Hope this helps. I&#039m still learning myself, so I hope I don&#039t steer you in the wrong dircection.<BR><BR>Chris

Posting Permissions

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