Filter form by two list boxes (web macro)

Toby Honest

New member
Local time
Today, 12:21
Joined
Dec 20, 2010
Messages
6
Access 2010/ web database/ web macro:

I have my Task Form, with a Task Subform. The subform should be filtered first by the list box ListWeeknumber, then the tasks displayed for the actual week should be filtered by the list box ListDepartments. I'm thinking something like this:

ListWeeknumber is populated with a value list, filtering the calculated field Weeknumber in the Tasks query, using an After Update /LocalVar/Setfilter event. This works OK. Now the filtered result (tasks by selected week) should be filtered by departments. How about this After Update macro:

If[ListWeeknumber]=True
Then
SetLocalVarName: week_department
Expression=[ListDepartments]

SetFilter
Where Condition= [Department ID]=[LocalVars]![week_department]
Control Name: [Task Subform]

Why is this not working?
 

Users who are viewing this thread

Back
Top Bottom