FantasiaDown
09-11-2003, 11:02 AM
[hey there]
so, the problem i had before concerning reading a sequential file (from the mnu_file click event yet again) has improved and for the most part, finally have the majority of it understood.
the only thing i'm really having problems with now is to change the input information into global variables and then have the information displayed on the appropriate form? how do i go abouts coding global variables?
this is what i have..
Private Sub mnuEdit_Click()
Dim strLName As String, strFName As String, strAddress As String, intApartment As String, strCity As String, strProvince As String, strPostal As String, strMemo As String
Const conprompt As String = "Enter the Contact's Last Name"
Const contitle As String = "Contact's Last Name"
strInput = InputBox(contitle, conprompt)
Dim strfilename As String
strfilename = App.Path & "contact.dat"
Open App.Path & "contact.dat" For Input As #1 'open sequential file
Do While Not EOF(1)
Input #1, strInput, strFName, strAddress, strApartment, strCity, strProvince, strPostal, strMemo 'read in from file
Loop
Close #1 'close file
any help would be great.
so, the problem i had before concerning reading a sequential file (from the mnu_file click event yet again) has improved and for the most part, finally have the majority of it understood.
the only thing i'm really having problems with now is to change the input information into global variables and then have the information displayed on the appropriate form? how do i go abouts coding global variables?
this is what i have..
Private Sub mnuEdit_Click()
Dim strLName As String, strFName As String, strAddress As String, intApartment As String, strCity As String, strProvince As String, strPostal As String, strMemo As String
Const conprompt As String = "Enter the Contact's Last Name"
Const contitle As String = "Contact's Last Name"
strInput = InputBox(contitle, conprompt)
Dim strfilename As String
strfilename = App.Path & "contact.dat"
Open App.Path & "contact.dat" For Input As #1 'open sequential file
Do While Not EOF(1)
Input #1, strInput, strFName, strAddress, strApartment, strCity, strProvince, strPostal, strMemo 'read in from file
Loop
Close #1 'close file
any help would be great.