Private Sub Item_TypeComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Item_TypeComboBox.SelectedIndexChanged
'auto increment for each type of items
If Item_TypeComboBox.SelectedItem = "Bages" Then
ItemIDTextBox.Text = Format("B" & (BagsIDTextBox.Text), "0000")
ElseIf Item_TypeComboBox.SelectedItem = "Accessories" Then
ItemIDTextBox.Text = Format("A" & (BagsIDTextBox.Text), "0000")
ElseIf Item_TypeComboBox.SelectedItem = "Cloth" Then
ItemIDTextBox.Text = Format("C" & (BagsIDTextBox.Text), "0000")
ElseIf Item_TypeComboBox.SelectedItem = "Extra" Then
ItemIDTextBox.Text = Format("E" & (BagsIDTextBox.Text), "0000")
ElseIf Item_TypeComboBox.SelectedItem = "Perfume" Then
ItemIDTextBox.Text = Format("P" & (BagsIDTextBox.Text), "0000")
ElseIf Item_TypeComboBox.SelectedItem = "Phone Cover" Then
ItemIDTextBox.Text = Format("PC" & (BagsIDTextBox.Text), "0000")
ElseIf Item_TypeComboBox.SelectedItem = "Socks" Then
ItemIDTextBox.Text = Format("S" & (BagsIDTextBox.Text), "0000")
ElseIf Item_TypeComboBox.SelectedItem = "Scarfs" Then
ItemIDTextBox.Text = Format("SC" & (BagsIDTextBox.Text), "0000")
ElseIf Item_TypeComboBox.SelectedItem = "Makeup" Then
ItemIDTextBox.Text = Format("M" & (BagsIDTextBox.Text), "0000")
End If
Bun2014 0 Newbie Poster
poojavb 29 Junior Poster
Bun2014 0 Newbie Poster
Bun2014 0 Newbie Poster
Bun2014 0 Newbie Poster
poojavb 29 Junior Poster
TrustyTony 888 pyMod Team Colleague Featured Poster
Sahil89 commented: Good job Tony +2
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.