OpenTextFile problem

G

Guest

I am using Access 2002. I have this code developed. I originally developed
this for Access 2000 and it works fine. In 2002 I get an error message at
line 5 where the Set tex = fs.OpenTextFile is coded. Any suggestions as to
why and how to fix it?

Thank you.

Private Sub btnBackText_Click()
Dim tex As TextStream 'declare text stream
Dim fs As FileSystemObject 'declare object
Set fs = New FileSystemObject 'instantiate object
Set tex = fs.OpenTextFile("PathForTextBackUP", ForReading, False) 'read
file for path
tex.ReadLine 'set variable to path
tex.Close 'close file
Set tex = Nothing 'release object
Set fs = Nothing 'release object
BackUpTextToA (strPath) 'call procedure to back up text to a drive
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top