>#define HEADER_LOC "Selected items:" > >ACTIVATE SCREEN >? HEADER_LOC >? "---------------" >FOR nCnt = 1 to ThisForm.container1.list2.ListCount > ? SPACE(5) + ThisForm.container1.list2.List(nCnt) >ddd= ThisForm.container1.list2.List(nCnt) >ENDFOR > > SELECT code, descr; > FROM student; > where code = ddd ; > into cursor csrmycursor >Try this (from the top of my head)
create cursor curListItems (cListItem C(10) FOR nCnt = 1 to ThisForm.container1.list2.ListCount ? SPACE(5) + ThisForm.container1.list2.List(nCnt) cListItem = ThisForm.container1.list2.List(nCnt) insert into curListItems from memvar ENDFOR SELECT code, descr ; FROM student inner join curListItems on ; Student.code = curListItems.cListItem ; into cursor csrmycursorBTW, what is your listbox rowsource? If you want to use all list items and not only selected, why not to use its rowsource if it's a cursor?