I have her 2 combobox.. this combobox are coursecombobox & yearcombox..

example
courses are IT,BSBA,&HRA
IT-2 years
BSBA & HRA- 4 years..

if im going to choose IT at coursecombobox the yearcombobox must show only 1st year and 2 year but if going to choose BSBA/HRA the year combox must show 1st year-4th year..

any suggestion for the codes? .

Do your codes in couesecombobox SelectedIndexChanged Event.
First Clear the items items from yearcombobox then add the items.

Private Sub coursecombobox_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles coursecombobox.SelectedIndexChanged
        yearcombox.Items.Clear()
        yearcombox.Items.Add("1st Year")
        yearcombox.Items.Add("2nd Year")
        If Not coursecombobox.Items(coursecombobox.SelectedIndex) = "IT" Then
            yearcombox.Items.Add("3rd Year")
            yearcombox.Items.Add("4th Year")
        End If
    End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.