aziz rasul
06-01-2007, 02:53 AM
I am trying to write data from a query to a text file using the Open Statement. Here's the code I have so far.
Dim FileName As String
Dim rstInternetRanging As DAO.Recordset
Set rstInternetRanging = CurrentDb.OpenRecordset("qryIntExp11", dbOpenDynaset)
FileName = "D:\Crystal\Current Development\Test.txt"
Open FileName For Output As #1
Write #1, rstInternetRanging!Keyword; rstInternetRanging!CountOfKeyword
rstInternetRanging.MoveNext
Close #1
The code works in the sense that I get the first line in the text file as I want it except that I want a SEMI-COLON to separate the 2 values not a COMMA
Here's what I get: -
"Control","272"
Here's what I want: -
"Control";"272"
How do I change my code to obtain this?
Dim FileName As String
Dim rstInternetRanging As DAO.Recordset
Set rstInternetRanging = CurrentDb.OpenRecordset("qryIntExp11", dbOpenDynaset)
FileName = "D:\Crystal\Current Development\Test.txt"
Open FileName For Output As #1
Write #1, rstInternetRanging!Keyword; rstInternetRanging!CountOfKeyword
rstInternetRanging.MoveNext
Close #1
The code works in the sense that I get the first line in the text file as I want it except that I want a SEMI-COLON to separate the 2 values not a COMMA
Here's what I get: -
"Control","272"
Here's what I want: -
"Control";"272"
How do I change my code to obtain this?