ok i have a store cash register program that i am making. The "items" that are available in the store have 3 things, which are in a wordpad document in this fashion:
1. A 3 number UPC code
2. A description (i.e. Pencil, or potatos)
3. A price
THE ACTUAL DOCUMENT LOOKS LIKE THIS: there is one characteristic of the item on one line..........
001 (upc)
Mashed Potatos (the item descritpion)
1.50 (the price)
002
Turkey
4.00
003
Pop Tarts
2.00
004
Pencil
.99
and so on for all the items.......
Now, in this program, i am typing a 3 digit numeber upc code into a text box and searching if that upc exists in the wordpad document.
If it does i want it to ONLY display the item description and the price for ONLY that particulat UPC that the user typed in the text box. I have it so far where its displaying EVERYTHING though. I want it to display only the 2 items (description and price) for the UPC that was typed in...........
so if u type in "001" i want it to display this: Mashed Potatoes.........................$1.50
with the dots and everyting. This is what i have and its displying EVERYTHING instead of one item:
CODE
infile = New StreamReader("C:\products.dat")
While infile.Peek() >= 0
UPCLine = infile.ReadLine
Label1.Text &= UPCLine & vbNewLine
End While
infile.Close()
what am i missing to make it disply only that item that you typed the upc code in for? And I have to be able to type in another one after that and add it to the list (including the same upc i just did if i wanted to)
This post has been edited by CanadaRules: 22 Nov, 2006 - 12:23 PM