Tom Keatley
tom.p at piedpiper.com.au
Wed May 3 18:52:48 CDT 2006
I think my brain has turned to toffee this morning..... I need to have multiple values select selected in a listbox from another listbox By selecting a line from the first listbox which contains the id's I then need those lines to appear selected in a second listbox For example my first listbox has a field with data in the form 73221,7259,13771,2 My second listbox contains those (and other)values 5698 7259 13771 2 73221 996589 23 38 and so on I choose the line in the first listbox I want the four lines selected in the second box The code below works fine for the single value but I need to loop thru the values in my first line to make it work.....should be simple but I simply cant get it to work Dim intI As Integer Dim strIDValue As String strIDValue = 73221 For intI = 0 To Me!listcon1.ListCount - 1 If Me!listcon1.ItemData(intI) = strIDValue Then Me!listcon1.Selected(intI) = True End If Next intI This code will select line 73221 Any suggestions? TIA Tom Keatley