|
-
September 12th, 2001, 08:01 PM
#1
List box
In my aplication I'm using Microsoft ActiveX Data Object Libraray. I have populate with code a List Box (the user can select more than one item (MultiSelect 1- simple).How can I filter a Recordset with the multiple selection?
Here the code that I use to populate the list box
Private Sub Form_load()
With mrsPartCode
Do Until .EOF
LstPartCode.AddItem !PartCode & vbTab & !PartDesc
.MoveNext
Loop
.MoveFirst
End With
End Sub
-
September 12th, 2001, 09:54 PM
#2
Re: List box
I can give u a hint on how to break the problem in to small pieces.
I assume that u have a button to click after u select Parts from ur list.
1. Find a way to get the "selected items of a list box"
2. Find a way to construct a SQL statement with the selected list with "OR" in between each list item.
Eg. Select * from tblParts where itemCode=IC1 OR itemCode=IC2 OR ....
3. SQL statement construction method has to be called either in the above 1. or once after an array is filled after completing 1.
Hope this put u in the track
Srinika
If u don't know how to Rate an answer, then Rate my answer to learn, If u know, then practice it 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|