Jessie
Nov 29th, 1999, 12:47 PM
I have a list of text files in a folder called MovieRentals. The File names are stored like Phone Numbers (555)-555-5555
when the program starts you are prompted to enter a phone number. i cannot figure out how to access the files and retrive the information in the files and put them into textBoxes this code is a test that i am running not the actual program can some one tell me what's wrong with it or show me a example that works I known parts of the code is wrong but not sure how to fix it
thxs in advance :)
Eg
(555)-555-5555
name
last name
address
phone number
Option Explicit
Dim strFileName As String
Dim strMember As String
Dim strNam As String
Dim intFreeFile As Integer
Private Sub Command1_Click()
txtMember = strFileName
strFileName = Dir("d:\MovieRental")
intFreeFile = FreeFile
Open strFileName For Append As intFreeFile
Do
Line Input #intFreeFile, strMember
Line Input #intFreeFile, strNam
Loop Until (EOF)
Close #intFreeFile
Pass_Values
End Sub
Private Sub Pass_Values()
txtText1 = strMember
txtText2 = strNam
End Sub
[This message has been edited by Jessie (edited 11-30-1999).]
when the program starts you are prompted to enter a phone number. i cannot figure out how to access the files and retrive the information in the files and put them into textBoxes this code is a test that i am running not the actual program can some one tell me what's wrong with it or show me a example that works I known parts of the code is wrong but not sure how to fix it
thxs in advance :)
Eg
(555)-555-5555
name
last name
address
phone number
Option Explicit
Dim strFileName As String
Dim strMember As String
Dim strNam As String
Dim intFreeFile As Integer
Private Sub Command1_Click()
txtMember = strFileName
strFileName = Dir("d:\MovieRental")
intFreeFile = FreeFile
Open strFileName For Append As intFreeFile
Do
Line Input #intFreeFile, strMember
Line Input #intFreeFile, strNam
Loop Until (EOF)
Close #intFreeFile
Pass_Values
End Sub
Private Sub Pass_Values()
txtText1 = strMember
txtText2 = strNam
End Sub
[This message has been edited by Jessie (edited 11-30-1999).]