i have the below code

For i = 0 To Me.checkedlistbox1.Items.Count - 1

If reader("productname") = checkedlistbox1.SelectedItem(i).ToString Then
checkedlistbox1.SetItemCheckState(i, chkstate)
End If

from the checkedbox list i want the items in the checkedlistbox1 to be checked depending on the matching text frm the database (reader("productname"))

but its not working correctly