473,486 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Combo Box to ListBox

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.

Jul 19 '05 #1
1 3020
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" <an*******@discussions.microsoft.com> wrote in message
news:0b****************************@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.

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
8081
by: Mark Lees | last post by:
I created a table that is list of persons who provide services. It will have 2 columns; ProviderId and Full name. I need my users to select a service provider,so I want to create a lookup to...
3
2418
by: RC | last post by:
I have a form where the user enters the Model info. The user picks the Model from either a combobox or listbox which both are filled from the Models table. If the Model type isn't in the boxes,...
1
2633
by: arthur-e | last post by:
How can you select records based on more than one combo box - I have a combobox that selects records based on name (I'm sure this has been asked a thousand times - web site answer/link could be...
2
1749
by: Inquiring_Mind | last post by:
i am creating a database. i have the following question.. as per the specs... i need to be able to pull other forms from the master form using either a list or a combo box. what is the...
7
1564
by: Hans Merkl | last post by:
Hi, Can anybody recommend a combo box control (textfield + dropdown list) for ASP.NET? I have looked at some products and it seems they all have some problems. I haven't yet found a combo box...
7
1715
by: Amanda | last post by:
User is going to be transferring items out of combobox to listbox and vice versa keeping ascending and desending order respectively at all time. If user selects the last item in combobox, the...
14
12301
by: rdade22 | last post by:
I have a combo box (cboStore) and a listbox (Qlist) both are unbound to a form call frmFAQ. What I want is to be a able to select a Subject from the combo box and have the results show up in the...
20
5183
by: exipnakias | last post by:
Hello Guys. In a form I created a listbox which looks up the values of a table. I want: 1) ..to create a query where a parameter will be needed in order to be loaded. But I do not want to...
0
1585
by: dudeja.rajat | last post by:
On Sat, Aug 30, 2008 at 2:32 PM, Fredrik Lundh <fredrik@pythonware.comwrote: Fredrik, Thanks so much. That worked. Following this, I can now see that my combo2 has no previous elements and...
0
7099
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7123
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5430
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4864
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.