How do I restrict options with Select Case
I have inherited some code from someone else, so please bear with me:
We are connecting to an SQL database and using asp code.
function get_title(col_name)
select case col_name
case "sel_date"
get_title = "Entry Date"
case "sel_zip"
get_title = "Reporting Zipcode"
case "team"
get_title = "Team"
end select
end function
Once the selections are made by the user, the query string is constructed just fine.....
The problem is, I want to be able to limit the choices in the drop-down selection based on another field in the database (a Local_ID field).
In other words, I want the choices in the "Team" case to only show the teams associated with "Locale ID 1"...
I keep thinking there should be a where statement but I don't know where to put it or what the proper syntax is.
|