Skip to main content
June 20, 2008
Question

ASP-Populate Listbox Values

  • June 20, 2008
  • 1 reply
  • 308 views
On my page I have two recordsets, rsEmployees and rsActivities. rsEmployees has EmployeeName and Department fields, and rsActivities has ActivityName and Department fields. On the page before, the user picks their name, and when my page loads, it creates a Session Variable that remembers what employee we're dealing with.

So I have a drop-down that offers the list of Activities available. Basically, I want that drop-down to populate based on department. I want to see what department that user is a member of, and populate the drop-down with only activities with the same department attached.

In my head, I think I want values WHERE:

(rsActivities.Fields.Item("Department").Value) = (rsEmployees.Fields.Item("Department").Value)

but not sure how to make this work. I've tried a bunch of different ways and am not having any luck. I'd appreciate any direction. Thanks!
This topic has been closed for replies.

1 reply

Inspiring
June 20, 2008
> On my page I have two recordsets, rsEmployees and rsActivities.
> rsEmployees
> has EmployeeName and Department fields, and rsActivities has ActivityName
> and
> Department fields. On the page before, the user picks their name, and
> when my
> page loads, it creates a Session Variable that remembers what employee
> we're
> dealing with.
>
> So I have a drop-down that offers the list of Activities available.
> Basically,
> I want that drop-down to populate based on department. I want to see what
> department that user is a member of, and populate the drop-down with only
> activities with the same department attached.
>
> In my head, I think I want values WHERE:
>
> (rsActivities.Fields.Item("Department").Value) =
> (rsEmployees.Fields.Item("Department").Value)




Make a recordset that filters the records based on the session variable, and
populate the dropdown with the results.