Q:

VB If Else Statement not working in Combo box

I have a combo box for the selection of subjects according to semester.  Like if first semester, then these will be the subjects and so on.  My combo box is already populated that came from my database.  My problem is, even it is First semester, the subjects shown on the combo box are the subject for the Second semester.  I have this feeling that the error has nothing to do with my queries but in the condition itself.  
Private Sub fillsubjectcombo()

    If yearlabel. Text = "Grade 11" Or course_label. Text = "STEM" Or semester_label. Text = "Second semester" Then

        Dim str As String

        con. Close()
        con. Open()

        str = "SELECT* FROM [Subjects] ORDER BY [STEM G11 SS]"
        cmd = New SqlClient. SqlCommand(str, con)
        cmd. CommandText = str
        cmd. Connection = con
        drd = cmd. ExecuteReader
        subject_cbx. Items. Clear()

        While (drd. Read())

            subject_cbx. Items. Add(drd("STEM G11 SS"))

        End While

        cmd. Dispose()
        drd. Close()
        con. Close()

    End If

    If yearlabel. Text = "Grade 11" Or course_label. Text = "STEM" Or semester_label. Text = "First semester" Then

        Dim sti As String

        con. Close()
        con. Open()

        sti = "SELECT* FROM [Subjects] ORDER BY [STEM G11 FS]"
        cmd = New SqlClient. SqlCommand(sti, con)
        cmd. CommandText = sti
        cmd. Connection = con
        drd = cmd. ExecuteReader
        subject_cbx. Items. Clear()

        While (drd. Read())

            subject_cbx. Items. Add(drd("STEM G11 FS"))

        End While

        cmd. Dispose()
        drd. Close()

        con. Close()

    End If

Can anyone help me?  Please :(

A:

As a rule of thumb, when you copy and paste lines on the same page, think back on what you're doing, because it probably could be improved upon. 
Here's a little thing I thought about your problem:
    If yearlabel. Text = "Grade 11" AndAlso course_label. Text = "STEM" Then
        Dim query As String
        Dim className As String

        If semester_label. Text <> "" Then
            Select Case semester_label. Text
                Case "First semester"
                    className = "[STEM G11 FS]"
                    query = "SELECT* FROM [Subjects] ORDER BY " & className
                Case "Second semester"
                    className = "[STEM G11 SS]"
                    query = "SELECT* FROM [Subjects] ORDER BY " & className
            End Select

            con. Close()
            con. Open()

            cmd = New SqlClient. SqlCommand(query, con)
            cmd. CommandText = query
            cmd. Connection = con
            drd = cmd. ExecuteReader
            subject_cbx. Items. Clear()

            While (drd. Read())
                subject_cbx. Items. Add(drd(className))
            End While

            cmd. Dispose()
            drd. Close()
            con. Close()
        End If
    End If

Notice that it's almost exactly your code, but arranged in a way which avoid repetitions.  And as a bonus, check your combo box now!