Populating multiple dropdown from an ADO database connection 
Author Message
 Populating multiple dropdown from an ADO database connection

Greetings. This is a broad question, and I am hoping that someone can
point me in the right direction. Basically, I have an Access 2000
database, that has one table, and multiple fields (Region, Country,
Address). The table contains all the offices for a large
multinational. A sample of the Database looks like this:

Region          Country         City            Address

North America   USA             Paramus 111 Main Street
North America   USA             New York        125 Park Ave.
South America   Mexico          Yunich          89 Jore Ave.
South America   Peru            Lima            56 ave E.
Asia Pacific    Singapore       Tuan            1445 Jones Street
Asia Pacific    Australia       Melbourne       334-5 J Street
Europe          Germany Munich          15 la bou lane
Europe          France          Paris           1 rue de la tree

I would like to have a page with a 4 dropdowns, running from left to
right, called (respectively) - Region, country, City, and Address. I
would like the first dropdown to be  "active" and allow the user to
choose a Region. Once the user has chosen a region, the second drop
down becomes active, and allows the user to choose a country from
within that Region. Then, the third dropdown would allow them to
choose a City and the last dropdown would allow them to choose an
address.

I have written ASP code using ADO to query the Access 2000 database
and populate the first dropdown. I need some help (or direction to a
web site) that I could use to understand how to program the rest of
this procedure.

Thank you.

Sam



Mon, 18 Oct 2004 10:29:43 GMT  
 Populating multiple dropdown from an ADO database connection
Sam,

all you have to do is to disable all the other three controls (country, city
and address) and enable only region while you load the page and load the
related data to that region.

Once the user Picks up the region then you will enable the next control
which is country and would populate the data based off of region. You would
want to run another query or stored procedure with an input from the first
selection list eg. "North America" and see if there are any countries listed
under northamerica.

once the user picks up a selection in country you will then follow the same
steps as you did for region. Now you would send both region "North America"
and "USA" as input parameters to the query or stored procedure and then see
if there are any cities in the database that match your criteria.

and finally with the addressess.

Let me know if you might need more information.

--
Cheers,
Sri T


Quote:
> Greetings. This is a broad question, and I am hoping that someone can
> point me in the right direction. Basically, I have an Access 2000
> database, that has one table, and multiple fields (Region, Country,
> Address). The table contains all the offices for a large
> multinational. A sample of the Database looks like this:

> Region Country City Address

> North America USA Paramus 111 Main Street
> North America USA New York 125 Park Ave.
> South America Mexico Yunich 89 Jore Ave.
> South America Peru Lima 56 ave E.
> Asia Pacific Singapore Tuan 1445 Jones Street
> Asia Pacific Australia Melbourne 334-5 J Street
> Europe Germany Munich 15 la bou lane
> Europe France Paris 1 rue de la tree

> I would like to have a page with a 4 dropdowns, running from left to
> right, called (respectively) - Region, country, City, and Address. I
> would like the first dropdown to be  "active" and allow the user to
> choose a Region. Once the user has chosen a region, the second drop
> down becomes active, and allows the user to choose a country from
> within that Region. Then, the third dropdown would allow them to
> choose a City and the last dropdown would allow them to choose an
> address.

> I have written ASP code using ADO to query the Access 2000 database
> and populate the first dropdown. I need some help (or direction to a
> web site) that I could use to understand how to program the rest of
> this procedure.

> Thank you.

> Sam



Mon, 18 Oct 2004 22:09:34 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. basic problem...

2. Multiple database connection using ADO

3. populate a database via dropdown

4. Excel 5 VB: Populate DropDown w/ only certain parts of database

5. WATCOM PASCAL

6. Populate one Dropdown determind by selection in another dropdown

7. PLEASE HELP ME with multiple ado connections

8. no message, no error.

9. Coded ado connection not working when tring to populate a textbox

10. Specifying TDatabase Remote Connection at Runtime (mssql)

11. Opening an Access database with ADO connection and VBScript

12. Populating a treeview from an ADO database

 

 
Powered by phpBB® Forum Software