every combobox selection is replaced with what a user has selected, I want it not to be replaced so that all seleced combobox can be printed
add text to a multiline textbox
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
TextBox3.Text = "Welcome to lumga book shop sales database" & vbNewLine & vbNewLine & _
"--------- --------- ------- ------------- ---------- --------" & vbNewLine & vbNewLine & _
"Your cashier : " & Sales_Log_in.txtUsername.Text & vbNewLine & vbNewLine & _
"##############################################################" & vbNewLine & vbNewLine & _
"DESCRIPTION OF ITEMS" & " " & "Quantity " & " " & "Price" & vbNewLine
If ComboBox1.SelectedIndex = 1 Then
TextBox3.Text = TextBox3.Text & vbNewLine & ComboBox1.SelectedItem & " " & TextBox7.Text & " " & Inventory1.price1.Text
End If
TextBox3.Text = TextBox3.Text & vbNewLine
If ComboBox1.SelectedIndex = 2 Then
TextBox3.Text = TextBox3.Text & vbNewLine & ComboBox1.SelectedItem & " " & TextBox7.Text & " " & Inventory1.price2.Text
End If
TextBox3.Text = TextBox3.Text & vbNewLine
If ComboBox1.SelectedIndex = 3 Then
TextBox3.Text = TextBox3.Text & vbNewLine & ComboBox1.SelectedItem & " " & TextBox7.Text & " " & Inventory1.price3.Text
End If
TextBox3.Text = TextBox3.Text & vbNewLine
If ComboBox1.SelectedIndex = 4 Then
TextBox3.Text = TextBox3.Text & vbNewLine & ComboBox1.SelectedItem & " " & TextBox7.Text & " " & Inventory1.price4.Text
End If
TextBox3.Text = TextBox3.Text & vbNewLine
If ComboBox1.SelectedIndex = 5 Then
TextBox3.Text = TextBox3.Text & vbNewLine & ComboBox1.SelectedItem & " " & TextBox7.Text & " " & Inventory1.price5.Text
End If
TextBox3.Text = TextBox3.Text & vbNewLine
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.