Filtering problem with listbox

chrizzis

Registered User.
Local time
Yesterday, 19:26
Joined
Dec 30, 2009
Messages
20
Primary table: tbl_mbr
Junction table: tblRef_mbrSkills
Reference table: tblRef_skills

I have a form (frmFilterDesiredSkills)

...with a listbox (listSkills)
Column Count: 2
Column Width: 0";2"
Bound Column: 1
Multi Select: Extended
Row Source:
SELECT tblRef_skills.skill_ID, tblRef_skills.skill_name
FROM tblRef_skills
ORDER BY tblRef_skills.skill_name;

...and a subform (frmListMbrsWithSkills_sf) with this query as the
Record Source:
SELECT tbl_mbr.*
FROM tbl_mbr, tblJoin_mbrSkills, tblRef_skills
WHERE (((tblRef_skills.skill_name)=[Forms]![frmFilterDesiredSkills]!
[listSkills]) AND ((tbl_mbr.mbr_ID)=[tblJoin_mbrSkills].[mbr_ID]) AND ((tblRef_skills.skill_ID)=[tblJoin_mbrSkills].[skill_ID])) OR (((tbl_mbr.mbr_ID)=[tblJoin_mbrSkills].[mbr_ID]) AND ((tblRef_skills.skill_ID)=[tblJoin_mbrSkills].[skill_ID]) AND (([Forms]![frmFilterDesiredSkills]!
[listSkills]) Is Null))
ORDER BY tbl_mbr.first_name;

...and a button ("Run Query")
On Click:
Form_frmFilterDesiredSkills.frmListMbrsWithSkills_sf.Form.Requery

Currently the subform displays the junction table data with no change when I select from the listbox and hit the "Run Query" button.

I want the filter to:
Display members satisfying all skill criteria selected in listbox.

Thanks,
-C
 
If you are using a multi select list box to increase the filtering requirements you need to parse the selections made and use the In() operator instead of the = operator.

David
 

Users who are viewing this thread

Back
Top Bottom