Originally Posted by
TheShabz
the listbox is a multivalue listbox. lets say we want to assign students to a class. I have a combo box for a teacher, a combobox for a class, and a listbox of a bunch of students. The user selects a teacher, a class, and selects multiple students. each iteration of the students in the listbox would have to be its own insert into string.
so basically what you'd have in a situation like that is something like:
Code:
dim s as string
dim i as long
for i=0 to me.listbox.rows.count-1
if me.listbox.columns(0,i).selected then
//EXECUTE sql with "me.listbox.columns(0,i)" as concated value
end if
next i
I'm not an expert with listboxes Shabz, so you'll have to get the properties on your own, but that's the idea.