Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need help with drop-down box values...

Status
Not open for further replies.

TonyU

Technical User
Feb 14, 2001
1,317
US

Hello and Happy Thanksgiving to all.
Here's what I have and where I need your help.
I have 1 drop-down box with the values Departments and
1 drop-down box with the values Employees.

I need to display all employees corresponding to each department when the user make a department selection.
Hope is clear and thanks in advance.









Tony
:cool:
 
Hi Tony,

Is the information about the Departments andEmployees contained in a database?
 
Hi Tony,

Is the information about the Departments and Employees contained in a database?
 
If you use Dreamweaver UltraDev, check this out:
WebAssist.com Dynamic Dropdowns.
They are designed to do exactly what you have asked Cost:$20
 
In ASP.NET this would be faily easy. In Classic ASP, you could do something like the following (assuming the Departments and Employees data is from a database, and not an array of dictionary object):

<%

Select Case myChoice
Case &quot;Departments&quot;
strSQL = &quot;SELECT * FROM yourTableName WHERE typeofemployees=Departments&quot;
...DO DATABASE CONNECTION STUFF HERE.....
' data presentation
For Each department in Departments
Response.Write obj.RS(&quot;deptname&quot;) & &quot;<br>&quot;
Next

Case &quot;Employees&quot;
strSQL = &quot;SELECT * FROM yourTableName WHERE typeofemployees=Employees&quot;
...DO DATABASE CONNECTION STUFF HERE.....
' data presentation
For Each employee in Employees
Response.Write obj.RS(&quot;employee&quot;) & &quot;<br>&quot;
Next

End Select
%>


HTH,
Jason

 
Yes, all my data is in Access 2000. Thanks for your responses fellas. Tony
:cool:
 
Tony, Check out the following Link. This sample uses global regions and countries in those regions, so it should be just a matter of swapping the field names for you. It is also built on an access backend with no DSN required. Check it out. It worked great for me and I was accessing an SQL Server.


BOL
:)
Peter
 
that link never opened Alabaster, Thanks tho Tony
:cool:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top