combo multi select list

R

Robert Painter

Hi
Hoping someone can help with this.
I have 2 cascading list boxes for query input.
The first is easy only 5 items from tblcategories.
the 2nd is 70 skills from tbl skills.
i have them working ok until it dawned on me someone may want skills from
two categories.
when i changed llstcategory multi select to simple the skill list went
blank.
when i try to carry selection over the first is lost
is it possible to select over both or should i change it to simple single
list box ??

hope you understand what i am getting at

Robert
 
P

Piet Linden

Hi
Hoping someone can help with this.
I have 2 cascading list boxes for query input.
The first is easy only 5 items from tblcategories.
the 2nd is 70 skills from tbl skills.
i have them working ok until it dawned on me someone may want skills from
two categories.
when i changed llstcategory  multi select to simple the skill list went
blank.
when i try to carry selection over the first is lost
is it possible to select over both or should i change it to simple single
list box ??

hope you understand what i am getting at

Robert

Are you trying to filter the second listbox based on multiple items in
the first? Then you would have to OR together the elements in the
ItemsSelected collection of the second first listbox to filter the
second. Then you'd have to set the recordsource of the second listbox
with the result of the query
 
R

Robert Painter

Sorry Piet I knew this was difficult to explain, however lets try:

At present i have 2 list boxes which cascade: lstCategories select 1 from 5
which then feeds category into lstSkill
so
category is driver
skill choice, artic, rigid, 7.5 tonne, van, analogue tacho, digital tacho

category is industrial
skill choice, forklift counterbalanced, forklift bendi, general labourer,
warehouse admin etc

this is working at present correctly but what if your employee has driver=
artic, analogue and digital tracho and also forklift bendi skills. Is there
a way to select this.

As my form stands when you select from category driver then go to category
industrual you catdriver selections are lost.

Hope that makes it clearer.

Robert
Hi
Hoping someone can help with this.
I have 2 cascading list boxes for query input.
The first is easy only 5 items from tblcategories.
the 2nd is 70 skills from tbl skills.
i have them working ok until it dawned on me someone may want skills from
two categories.
when i changed llstcategory multi select to simple the skill list went
blank.
when i try to carry selection over the first is lost
is it possible to select over both or should i change it to simple single
list box ??

hope you understand what i am getting at

Robert

Are you trying to filter the second listbox based on multiple items in
the first? Then you would have to OR together the elements in the
ItemsSelected collection of the second first listbox to filter the
second. Then you'd have to set the recordsource of the second listbox
with the result of the query
 
R

Robert Painter

Linq Adams via AccessMonster.com said:
Originally, I suspect, you're using the .Value property of the
lstCategories
to set the lstSkill Listbox. When you change the Multi-Select Property of
a
Listbox from "No" to either "Simple" or "Extended" in essence the Listbox
loses its .Value Property. You have to loop thru the contents, as Piet has
posted, to see what has been selected, and then use an Or construct in the
query for the second Listbox.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com

Hi Linq

This is the code i am using to populate 2nd list box:

Private Sub lstCategory_AfterUpdate()
On Error Resume Next
LstSkill.RowSource = "Select DISTINCT
tblSkills.SkillDescription,tblSkills.SkillID " & _
"FROM tblCategory RIGHT JOIN tblSkills " & _
"ON tblCategory.CategoryID = tblSkills.CategoryIDFK " & _
"WHERE (((tblCategory.CategoryDescription) =
[Forms]![frmSkillsListQuery]![lstCategory])) " & _
"ORDER BY tblSkills.SkillDescription;"
End Sub

Where would i put the 'OR' construct.

Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top