I have a few orders with UPC codes, names , and prices this is an example

UPC Item Price

0921115120 Dark chocolate 13.75
2222100051 Mint meltaways 14.10

What im suppose to do is allow to user to enter the products items sold and then view batch reports on how many were sold. This needs to display the product name and total quantity sold after data entry has been made and how much should be collected for each item and the grand total for entire order. The same data must be stored on the computer (database or data file) and be retrievable by date. I know I need to show work, but if someone shows me how to start doing one and then I can do the rest. I have about 5 different items, but if you guys could show me how to do these two, then I could probably figure out how to finish the rest, thanks

the upc, item, and prices were spread out to make it look more organized when I entered them, this should help things out
Item 1

upc : 0921115120
Item : Dark chocolate
Price : 13.75

Item 2
upc : 2222100051
Item : Mint meltaways
Price: 14.10

I was thinking something like this to check to see if the items where in the system

Public Class Form1

    ' This is to see if the item number that was entered is correct or not
    Private Sub btncheck_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncheck.Click
        If Not TextBox1.Text = "0921115150 " Then ' If textbox doesnt contain  0921115150 “Dark Chocolate Truffles” then
            If Not TextBox1.Text = " 2221001501 " Then ' If textbox doesnt contain 2221001501 “ mint mintaways” then
If Not TextBox1.Text = " 6652300415 " Then ' If textbox doesnt contain 6652300415  “Chocolate Covered Cherries” then
                If Not TextBox5.Text = " 0255541028 " Then ' If textbox doesnt contain 0255541028 “Malted Milk Balls” then
                    If Not TextBox1.Text = " 0921115141 " Then ' If textbox doesnt contain 0921115141 “Chocolate Covered Raisins “ then
                        MsgBox("Must be either: 0921115150 /2221001501 /6652300415 /0255541028 /0921115141  , MsgBoxStyle.Exclamation") ' Error message displayed
                    End If
                End If
            End If
        End If
    End Sub
End Class

And then have a button that adds it to a database, but at the same time adds a one (kinda like a taly) to the item. Then have another button that calculates how many items there were with the price that it costs and have a total for that item, then have a grand total. Is this possible

Edited 5 Years Ago by Narue: Added code tags

for some reason it didnt put the code into a code box

Public Class Form1

    ' This is to see if the item number that was entered is correct or not
    Private Sub btncheck_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncheck.Click
        If Not TextBox1.Text = "0921115150 " Then ' If textbox doesnt contain  0921115150 “Dark Chocolate Truffles” then
            If Not TextBox1.Text = " 2221001501 " Then ' If textbox doesnt contain 2221001501 “ mint mintaways” then
If Not TextBox1.Text = " 6652300415 " Then ' If textbox doesnt contain 6652300415  “Chocolate Covered Cherries” then
                If Not TextBox5.Text = " 0255541028 " Then ' If textbox doesnt contain 0255541028 “Malted Milk Balls” then
                    If Not TextBox1.Text = " 0921115141 " Then ' If textbox doesnt contain 0921115141 “Chocolate Covered Raisins “ then
                        MsgBox("Must be either: 0921115150 /2221001501 /6652300415 /0255541028 /0921115141  , MsgBoxStyle.Exclamation") ' Error message displayed
                    End If
                End If
            End If
        End If
    End Sub
End Class

This will not add anything to a database, but it might make it easier to work with for your previously posted code.

Select Case TextBox1.Text
            '// 0921115150 “Dark Chocolate Truffles”, 2221001501 “ mint mintaways”, 6652300415 “Chocolate Covered Cherries”,
            '// 0255541028 “Malted Milk Balls”, 0921115141 “Chocolate Covered Raisins “
            Case "0921115150 ", " 2221001501 ", " 6652300415 ", " 0255541028 ", " 0921115141 "
                MsgBox("Correct #")
            Case Else
                MsgBox("Must be either: 0921115150 /2221001501 /6652300415 /0255541028 /0921115141 ", MsgBoxStyle.Exclamation) ' Error message displayed
        End Select
This article has been dead for over six months. Start a new discussion instead.