R
René
Hello,
I need to create an array from value in an listbox. So far I have the
following code:
_______
strSQL = "SELECT TblCallSLA.SLA_Number " & _
"FROM TblCallSLA " & _
"WHERE TblCallSLA.Practice='DDS'"
Form_Form1!lstSLA_Numbers.RowSource = strSQL
For lSelItem = 0 To Form_Form1!lstSLA_Numbers.ListCount - 1
Form_Form1!lstSLA_Numbers.Selected(lSelItem) = True
MyArray = MyArray & Form_Form1!lstSLA_Numbers.Value & ", "
Next
MyArray = Array(Left(MyArray, Len(MyArray) - 2))
For Each varArray In MyArray
etc.....
_________
But something goes wrong. 'varArray' holds the entire string instead of
individual values of the array. What am I doing wrong or is there a simpler
way to create an array from listbox values?
Thanks
René
I need to create an array from value in an listbox. So far I have the
following code:
_______
strSQL = "SELECT TblCallSLA.SLA_Number " & _
"FROM TblCallSLA " & _
"WHERE TblCallSLA.Practice='DDS'"
Form_Form1!lstSLA_Numbers.RowSource = strSQL
For lSelItem = 0 To Form_Form1!lstSLA_Numbers.ListCount - 1
Form_Form1!lstSLA_Numbers.Selected(lSelItem) = True
MyArray = MyArray & Form_Form1!lstSLA_Numbers.Value & ", "
Next
MyArray = Array(Left(MyArray, Len(MyArray) - 2))
For Each varArray In MyArray
etc.....
_________
But something goes wrong. 'varArray' holds the entire string instead of
individual values of the array. What am I doing wrong or is there a simpler
way to create an array from listbox values?
Thanks
René