|
-
May 4th, 2000, 03:57 AM
#1
Thread Starter
Hyperactive Member
I have a multiselect listbox that's populated with words and each word is assigned a number through the itemdata property like this:
strSql = "SELECT * FROM Vocational ORDER BY vocdesc"
Set rstTemp = fCnn1.Execute(strSql)
Do While Not rstTemp.EOF
lstVocational.AddItem rstTemp!vocdesc
lstVocational.ItemData(lstVocational.NewIndex) = rstTemp!vocid
rstTemp.MoveNext
Loop
What I want to do is select certain indexes in the listbox based on the itemdata property without loooping through the listbox. Is that possible?
I know this is wrong but Something like this:
strSql = "SELECT internalvoc.vocid FROM internalvoc "
strSql = strSql & "WHERE referralid = " & strReferralID
Set rstTemp = fCnn1.Execute(strSql)
Do While Not rstTemp.EOF
'THIS IS WHAT I WANT TO CHANGE
lstVocational.Selected(lstVocational.ItemData(rstTemp!vocid)) = True
rstTemp.MoveNext
Loop
Thanks in advance,
-
May 4th, 2000, 05:30 PM
#2
Member
Sorry your question is not clear.
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
|