Hi guys, I'm having a simple problem, I can't beleive I'm stuck trying to get this work, but I can't retreive information from a list box. I can't seen to be getting a string from it. This is the code I use. Any help would be greatly appreciated. Thanks for taking the time to read.
Mesk
For Each course_code In lbCourse.SelectedItems
course_code = course_code.Substring(1, 2) + course_code.Substring(4, 3) + course_code.Substring(7, 2)
'need to finish the SQL statement
StrSQL = "INSERT INTO PROGRAM_COURSE VALUES(PROGRAM_COURSE_SEQ.NEXTVAL, '" + program_code + "', '" + option_code + "', '" + course_code + "', " & academic_year & ", " & year_in_program & ", '" + semester_code + "'"
Next
Mesk
For Each course_code In lbCourse.SelectedItems
course_code = course_code.Substring(1, 2) + course_code.Substring(4, 3) + course_code.Substring(7, 2)
'need to finish the SQL statement
StrSQL = "INSERT INTO PROGRAM_COURSE VALUES(PROGRAM_COURSE_SEQ.NEXTVAL, '" + program_code + "', '" + option_code + "', '" + course_code + "', " & academic_year & ", " & year_in_program & ", '" + semester_code + "'"
Next