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
Recommended Answers
Jump to PostWhat is the issue u r facing in this??? please explain in detail
Jump to PostUse the edit post link do not post again. And please indent all your code one level by highlight and pushing TAB key to make it formatted as Code or put
~~~ vb
~~~around the code (line before and line after), ~ must be the first character on line.
…
All 6 Replies
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.