Question with reading from txtfile
Hi again, I am pretty sure this didn't post twice. Anyway, I have this program which I am supposed to make which requires me to write to a txt file then read it. Now I looked through the msg boards and found lots of things about this, however, nothing which is what i need exactly, or it was there and I just didn't understand it.
I have 4 textboxes. One is name, Second is Artist, Third is Price and forth is path.
I can get them all to work except the price which always shows up as 0 in the textbox.
My real problem is with reading it. When i click my retrieve button it is supposed to hide the first form and open a second one which is exactly alike except for no path textbox or save. I need the information which is printed into the textbox to go into the corresponding textboxes in the 2nd form. In the first form I have a save button which writes to the file, it can save multiple times and what I need as well is when it is saved multiple times I can click retrieve for the next form then on that form click another button called retrieve next which would give me the info on the 2nd line and put it in the corresponding textboxes.
My code for the write is below, I don't have any for retrieve yet except just hiding and showing the forms. I tried a few ways from reading the msg board but none would work how I need them.
Anyhelp would be great
Thanks
Code:
Private Sub cmdSave_Click()
Dim strTitle As String
Dim strArtist As String
Dim curPrice As Currency
strTitle = txtTitle.Text
strArtist = txtArtist.Text
curPrice = Val(curPrice)
Dim ff&
ff = FreeFile
Open "h:\test.txt" For Append As #ff
Write #ff, strTitle, strArtist, curPrice
Close #ff
txtTitle = ""
txtArtist = ""
txtPrice = ""
End Sub