Dim item As String = InputBox("Enter Item ordered", "Place an order")
Dim quantity As Integer = InputBox("Enter Quantity odered", "Quantity ordered")
Dim price As Integer = InputBox("Enter price", "Price each")
Dim item As String = InputBox("Enter Item ordered", "Place an order")
Dim WrapCharacter As String
WrapCharacter = Chr(13) + Chr(10)
If Where <> 0 Then
txtSales.Focus()
txtSales.SelectionStart = Where - 1
txtSales.SelectionLength = Len(item)
Do While txtSales.Text = txtSales.Text & "Item : " & item & vbNewLine & "Quantity : " & InStr(txtSales.Text, quantity) + quantity & vbNewLine & "Price :" & price & vbNewLine & WrapCharacter & vbNewLine
Loop
Else
txtSales.Text = txtSales.Text & "Item : " & item & vbNewLine & "Quantity : " & quantity & vbNewLine & "Price :" & price & vbNewLine & WrapCharacter & vbNewLine
End If
from the above codes I want to reference an Item, if item is in the textbox, it must not be added again, else the quantity to be incremented by the quantity got quantity inputbox and the pcice be the same it items are the same