Ok... I have backups of all my movies on my computer... I am trying to make a database of them using VB. I already made one with OOCalc (Open Office Excel basically). Anyways... my code to enter a movie in the data base is as follows:
(Please keep in mind i rushed this code and didnt do alot of the standard naming)

Private Sub Command2_Click()
Open "C:\Movies\Data Base\Name.txt" For Append As #1
Write #1, txtname.Text
Close #1

Open "C:\Movies\Data Base\Location.txt" For Append As #1
Write #1, txtlocation.Text
Close #1

Open "C:\Movies\Data Base\imdb.txt" For Append As #1
Write #1, txtimdb.Text
Close #1

Open "C:\Movies\Data Base\personal.txt" For Append As #1
Write #1, txtpersonal.Text
Close #1

Open "C:\Movies\Data Base\year.txt" For Append As #1
Write #1, txtyear.Text
Close #1

Open "C:\Movies\Data Base\genre1.txt" For Append As #1
Write #1, txtgenre1.Text
Close #1

Open "C:\Movies\Data Base\genre2.txt" For Append As #1
Write #1, txtgenre2.Text
Close #1

Open "C:\Movies\Data Base\Director.txt" For Append As #1
Write #1, txtdirector.Text
Close #1

Open "C:\Movies\Data Base\Lead1.txt" For Append As #1
Write #1, txtlead1.Text
Close #1

Open "C:\Movies\Data Base\Lead2.txt" For Append As #1
Write #1, txtlead2.Text
Close #1

Open "C:\Movies\Data Base\Lead3.txt" For Append As #1
Write #1, txtlead3.Text
Close #1

MsgBox "Data saved"
End Sub

Now what I want to do is add another form to the project. I want this for to be able to read from the text files and use it as a database so that when I select a movie from the drop down list, it will display all the data and have a button to open winamp to play the movies. I have no idea on how to go about this and any help will be appreciated. Thanks :)

Ok... I know how to get it read from a text. For example:

Open "C:\Movies\Data Base\me.txt" For Input As #2
Input #2, strpass
Close #2

I just need to know how to get it to read a certain line from the text document... and to get it to find which line the original is on.

ok... I got the code for reading from lines, ect:

Private Sub cbotitle_Click()
Dim strmovie As String, strlocation As String, strimdb As String, strper As String, stryear As String, strgen1 As String, strgen2 As String, strdirect As String, strlead1 As String, strlead2 As String, strlead3 As String

Open "C:\Movies\Data Base\Movie.txt" For Input As #2
Do While Not EOF(2)
Input #2, strmovie, strlocation, strimdb, strper, stryear, strgen1, strgen2, strdirect, strlead1, strlead2, strlead3
If strmovie = cbotitle.Text Then
lblimdb.Caption = "IMDb Rating:" & vbCrLf & strimdb
lblpersonal.Caption = "Personal Rating:" & vbCrLf & strper
lblyear.Caption = "Year:" & vbCrLf & stryear
lblgen1.Caption = "Main Genre:" & vbCrLf & strgen1
lblgen2.Caption = "Second Genre:" & vbCrLf & strgen2
lbldirect.Caption = "Director: " & strdirect
lbllead1.Caption = "Leading Actor: " & strlead1
lbllead2.Caption = "Secondary Actor: " & strlead2
lbllead3.Caption = "Supporting Actor: " & strlead3
End If
Loop
Close #2
End Sub

Now I have one more problem I really need help with. Opening the video file with the strlocation variable. I have a command button (cmdplay) and I want to be able to open the movie with that button after it is selected. Thank you

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.