Private Sub lstUserName_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstUserName.SelectedIndexChanged
Dim selectrow As DataRow
Try
If _loaded = 1 Then
selectrow = Ds.User.Select("UserID = " & CInt(lstUserName.SelectedValue))(0)
cbAccessLevel.SelectedValue = selectrow.Item("Column") '--This is where it blows up
MessageBox.Show(selectrow.Item("Column").ToString)
End If
Catch ex As Exception
MsgBox(ex.Message)
MsgBox(lstUser.SelectedIndex.ToString + " and " + lstUserName.SelectedIndex.ToString)
End Try
End Sub |