Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

ASP-Populate Listbox Values

Guest
Jun 20, 2008 Jun 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)

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!
TOPICS
Server side applications
310
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 20, 2008 Jun 20, 2008
LATEST
> 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines