drop-down value

L

LC

Hi,

Lets say I connected to an Access database and created an
sql and then created a drop down list.

<%
strSQL = "SELECT tblEV3Location.Division,
tblEV3Location.Code FROM tblEV3Location
ORDER BY tblEV3Location.Division;"

set cars=adoCon.execute(strSQL)
%>

<select name="Division">
<% 'Loop through the recordset to make each entry
in the list. %>
<% do while not cars.eof %>
<Option value = "<%= cars(1) %>"> <%= cars
(0) %></Option>
<%cars.movenext
loop%>
</select>

After the user selects a value from the drop-down, how do
I refer to it in coding on the same page? I want to use
the user's value
to start another sql in the same table or to put that
value in a textbox. For the textbox idea, how would I do
that?

Any help appreciated.
Thanks.
 
T

Thomas A. Rowe

It would be easier to just pass the form value to another page which then does a query to the
database for the record based on the selected value and then displaying the results, instead of
trying to use the same page and doing a second query unless you are really comfortable with
ASP/VBScript, where you will have to set up the current page to bypass the second query until a
value has been selected in the first query (dropdown menu).

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top