A real begineer
Registered User.
- Local time
- Today, 19:55
- Joined
- Nov 4, 2000
- Messages
- 74
I have been playing with the idea of outputting to a file for tempoary storage some data using the input output append methods. However, when I search help on these topics my help loops into a crash. I am using Access 2000.
So far I have written the following code which certainly creates the datafile, although I can't work out the reciprocal statement to input the data back into another textbox on the form.
Here is what I have done:
Private Sub chkA_Click()
Dim varA As Variant
Dim strChk As String
varA = txtM
strChk = MsgBox("I am txtM " & varA)
Dim TextLine
Open "C:\Dynamic\TESTFILE" For Append As #1 ' Open file.
Do While Not EOF(1) ' Loop until end of file.
Line Input #1, varA ' Read line into variable.
Loop
Close #1 ' Close file.
Call chkB
End Sub
chkB is another function which is supposed to read file TESTFILE and then output the varA to a textbox on the same form.
So far all I have generated is errors. My help file refers to an output function. Yet if I type a copy of my first line of code with output in place of input it accepts this, but does not accept:
Line Output #1,varA
So how does this work?
So far I have written the following code which certainly creates the datafile, although I can't work out the reciprocal statement to input the data back into another textbox on the form.
Here is what I have done:
Private Sub chkA_Click()
Dim varA As Variant
Dim strChk As String
varA = txtM
strChk = MsgBox("I am txtM " & varA)
Dim TextLine
Open "C:\Dynamic\TESTFILE" For Append As #1 ' Open file.
Do While Not EOF(1) ' Loop until end of file.
Line Input #1, varA ' Read line into variable.
Loop
Close #1 ' Close file.
Call chkB
End Sub
chkB is another function which is supposed to read file TESTFILE and then output the varA to a textbox on the same form.
So far all I have generated is errors. My help file refers to an output function. Yet if I type a copy of my first line of code with output in place of input it accepts this, but does not accept:
Line Output #1,varA
So how does this work?