How do you open a file for appending data?
- From: "M Shafaat" <poppy2@xxxxxxxxx>
- Date: Sat, 24 Nov 2007 02:38:37 +0100
Hi,
I am trying to write data from SEVERAL tables in an Access application into
a SINGLE text file, using the VBA code and the keyword "ForAppending",
without success.
The following code with the keyword "ForAppending" does not just function,
despite the VBA Help presents it as example:
Sub OpenTextFileTest
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Dim fs, f
Set fs = CreateObject("Scripting.FileSystemObject")
' HERE IS THE STATEMENT THAT DOESN'T FUNCTION::
Set f = fs.OpenTextFile("c:\testfile.txt", ForAppending,TristateFalse)
f.Write "Hello world!"
f.Close
End Sub
How can I go around this problem?
I am using Windows XP Pro SP2 and MS Access 2003 SP2
Ragards
M Shafaat
.
- Prev by Date: Re: OpenForm Filtering too much
- Next by Date: Re: OpenForm Filtering too much
- Previous by thread: Re: OpenForm Filtering too much
- Next by thread: Passing Macro value to Form
- Index(es):
Relevant Pages
|