I have an ASP page which show's a Drop-Down Combo box, and
a ListBox. My Combo Box is populated from a SQL Select
Statement which shows User Groups. I want to populate my
Listbox with all the names associated with that User Group
selected from the Combo Box. I have a Select Statement
that does this already also.

However, I need to pass the Selected item chosen in the
Combo Box with my SQL statement so I can get the correct
list of names returned. The ASP page tries to run both
Select statements, but errors when it reaches the second
select statement since the parameter hasn't been filled
yet, because the page hasn't given me a chance to chose an
item from the Combo Box.

Does anyone know how I can accomplish this?

Currently, we are NOT using ASP.Net.

Re: Combo Box to ListBox by Ray

Ray
Thu Nov 20 22:39:10 CST 2003

To do this, you need to either load all of the possible information in the
page and then use client-side script to change the second SELECT, or make it
a two step process where the user makes his first selection, the another
trip is made to the server (by submitting the data, or using client side
code to reload the page, etc.) and the server will then have that info it
needs for the second query.

See here for links to samples. http://www.aspfaq.com/2270

Ray at home

"Scott" <anonymous@discussions.microsoft.com> wrote in message
news:0b7701c3afca$77775630$a001280a@phx.gbl...
> I have an ASP page which show's a Drop-Down Combo box, and
> a ListBox. My Combo Box is populated from a SQL Select
> Statement which shows User Groups. I want to populate my
> Listbox with all the names associated with that User Group
> selected from the Combo Box. I have a Select Statement
> that does this already also.
>
> However, I need to pass the Selected item chosen in the
> Combo Box with my SQL statement so I can get the correct
> list of names returned. The ASP page tries to run both
> Select statements, but errors when it reaches the second
> select statement since the parameter hasn't been filled
> yet, because the page hasn't given me a chance to chose an
> item from the Combo Box.
>
> Does anyone know how I can accomplish this?
>
> Currently, we are NOT using ASP.Net.
>