Fill Combo Box based on another Combo Box

D

dthmtlgod

I have a form on my webpage.

There are many comboboxes. One of them is where a user can select a
"State".
Based on the state, I want to select a "County". The form should populate
only the counties that apply to that State

I know how to do the JOIN if needed, but not quite sure how to pass the
value of the "State" combobox to the query that will be populating "County"

SELECT County
FROM Census
WHERE County = (value of the combobox "State")

Here is the code from the combobox "State"

<td><strong>Jurisdiction:</strong></td>
<td><select style="width: 50px;" name="State">
<option></option>
<%
While NOT RS2.EOF
%>
<option value="<%=RS2(0)%>"><%=RS2(0)%></option>
<%
RS2.MoveNext
WEND
%>

Thanks in advance
 

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

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top