473,569 Members | 2,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Export to Text File with newline delimiter

jim
Hi All,

I need to export a query to a text file but i need each field delimited
by a new line. Cant seem to find a way to do it.

any ideas..

thanks

jim
Jun 27 '08 #1
15 4063
Jim,

Could you clarify what you mean by "each field delimited by a new line".
Does the query return multiple records?

Steve
"jim" <ji*@blahblah.b lahwrote in message
news:4_******** *************** *******@posted. metronet...
Hi All,

I need to export a query to a text file but i need each field delimited by
a new line. Cant seem to find a way to do it.

any ideas..

thanks

jim

Jun 27 '08 #2
jim
Hi Steve,

Thanks for the reply... i have a table with username and email addresses
and i wish to output it as follows:

username1
email1

username2
email2

username3
email3

rather than:
username1, email1
username2, email2
username3, email3
cant seem to find a way to do it.... any ideas appreciated..

cheers

jim
Mark wrote:
Jim,

Could you clarify what you mean by "each field delimited by a new line".
Does the query return multiple records?

Steve
"jim" <ji*@blahblah.b lahwrote in message
news:4_******** *************** *******@posted. metronet...
>Hi All,

I need to export a query to a text file but i need each field delimited by
a new line. Cant seem to find a way to do it.

any ideas..

thanks

jim

Jun 27 '08 #3
Hi Jim,

Try the following:

Dim DB As DAO.Database
Dim Rst As Recordset
Set DB = CurrentDB()
Set Rst = DB.OpenRecordse t("NameOfYourTa ble")
Open "C:\TESTFILE.Tx t" For Output As #1
Do Until Rst.EOF
Print #1, Rst!UserName
Print #1, Rst!Email
Print #1, ""
Rst.MoveNext
Loop
Close #1
Set DB = Nothing
Rst.Close
Set Rst = Nothing

Notes ....

1. In the line Open "C:\TESTFILE.Tx t" For Output As #1, Change
C:\TESTFILE.Txt to wherever you wantto store your text data.
2. In the two lines, Print #1, Rst!UserName and Print #1, Rst!Email, be
sure to use the actual field names in your table

I provide users a resource for help with Access, Excel and Word
applications. My fees ar very reasonable. If you ever need help beyond what
a newsgroup can provide, please contact me at rl****@penn.com.

Steve

"jim" <ji*@blahblah.b lahwrote in message
news:fP******** *************** *******@posted. metronet...
Hi Steve,

Thanks for the reply... i have a table with username and email addresses
and i wish to output it as follows:

username1
email1

username2
email2

username3
email3

rather than:
username1, email1
username2, email2
username3, email3
cant seem to find a way to do it.... any ideas appreciated..

cheers

jim
Mark wrote:
>Jim,

Could you clarify what you mean by "each field delimited by a new line".
Does the query return multiple records?

Steve
"jim" <ji*@blahblah.b lahwrote in message
news:4_******* *************** ********@posted .metronet...
>>Hi All,

I need to export a query to a text file but i need each field delimited
by a new line. Cant seem to find a way to do it.

any ideas..

thanks

jim
Jun 28 '08 #4
"Mark" <no***@email.co mwrote in message
news:G_******** *************** *******@earthli nk.com...
I provide users a resource for help with Access, Excel and Word
applications. My fees ar very reasonable. If you ever need help beyond
what a newsgroup can provide, please contact me at rl****@penn.com.

Steve
Jun 28 '08 #5
"Mark" <no***@email.co m>
rl****@penn.com.
Steve

What's worse is that he's showing his multiple personalities.

--
Bob Quintal

PA is y I've altered my email address.
** Posted from http://www.teranews.com **
Jun 28 '08 #6
On Fri, 27 Jun 2008 20:37:10 -0400, "John Marshall, MVP"
<la******@stone henge.cawrote:

Per the newsgroup charter posted here:
http://www.mvps.org/access/netiquette.htm
it is not.
A certain Steve can't be bothered with that. That's why we shun him.

-Tom.
>"Mark" <no***@email.co mwrote in message
news:G_******* *************** ********@earthl ink.com...
>I provide users a resource for help with Access, Excel and Word
applications . My fees ar very reasonable. If you ever need help beyond
what a newsgroup can provide, please contact me at rl****@penn.com.

Steve
Jun 28 '08 #7
"Mark" <no***@email.co mwrote
:
>I provide users a resource for help with Access, Excel and Word
applications . My fees ar very reasonable. If you ever need help beyond what
a newsgroup can provide, please contact me at rl****@penn.com.
Steve

Soliciting for customers here too. Shame on you.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Jun 28 '08 #8

"Mark" <no***@email.co mschreef in bericht news:G_******** *************** *******@earthli nk.com...
Hi Jim,

I provide users a resource for help with Access, Excel and Word
applications. My fees ar very reasonable. If you ever need help beyond what
a newsgroup can provide, please contact me at rl****@penn.com.

Steve

--
ARRRGGGHHHHHHHH !!!!!!!!
--
http://home.tiscali.nl/arracom/whoissteve.html
(Earthlink kicked him out ?? SuperNews also ?? ==updated 'abuse-reporting')
Until now 5750+ pageloads, 3600+ first-time visitors (these figures are *real* and rapidly increasing)

*************** *************** ***
If anyone wants to help us getting rid of Steve (at least for a while) again ??
ab***@giganews. com (appropriate action will follow when there are enough complaints)
*************** *************** ***

Arno R
Jun 28 '08 #9

"Bob Quintal" <rq******@sPAmp atico.caschreef in bericht news:Xn******** **************@ 66.175.223.2...
"Mark" <no***@email.co m
rl****@penn.com.
Steve

What's worse is that he's showing his multiple personalities.

--
Bob Quintal

PA is y I've altered my email address.
** Posted from http://www.teranews.com **

He is showing his new ISP also: GigaNews.

http://home.tiscali.nl/arracom/whoissteve.html
(Earthlink kicked him out ?? SuperNews also ?? ==updated 'abuse-reporting')

*************** *************** ***
If anyone wants to help us getting rid of Steve (at least for a while) again ??
ab***@giganews. com (appropriate action will follow when there are enough complaints)
*************** *************** ***

Arno R
Jun 28 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4265
by: Ruben | last post by:
Hello. I am trying to read a small text file using the readline statement. I can only read the first 2 records from the file. It stops at the blank lines or at lines with only spaces. I have a while statement checking for an empty string "" which I understand represents an EOF in Python. The text file has some blank lines with spaces and...
2
4352
by: Dave Stone | last post by:
Does anyone know if it's possible to use the wizard or DTS Designer to accept a source file with the following simplified format: <field1label>: <record1field1value> <field2label>: <record1field2value> - - - - - - - <fieldNlabel>: <record1fieldNvalue> <field1label>: <record2field1value> <field2label>: <record2field2value>
2
4266
by: Brad Sanders | last post by:
Hello All, Thanks to Richard's answer to my last post I understand now what I have to do, but.. How do I put a Line Feed or a Form Feed into a text file? Looking throught the .net help it mentions \f but illustrates no way write it to a text file. Thanks
2
20292
by: RadhakrishnanR | last post by:
Hi, By using VB6.0, I want to export database table data into text file with a tab delimiter. My User interface has: • Drop down list box contain list of data base table name. • A path selection area, allowing the user to specify the filename, path and file type for the export. This will incorporate standard Windows functionality for...
1
3087
by: Quentin | last post by:
I want to take a comma delimited text file and export it to excel format, using the comma as the delimiter. Any help on this would be great, thank you.
9
7688
by: NEWSGROUPS | last post by:
I have data in a table in an Access 2000 database that needs to be exported to a formatted text file. For instance, the first field is an account number that is formatted in the table as text and is 8 characters long. This field needs to be exported as pic(15) padded in the front with 0's (zeros). The next field an ID name that is 15...
3
12325
by: GoalieDude | last post by:
My problem is that I'll receive a large excel file from a customer that has hard return in one of the cells (i.e. pressing alt + enter to make a new line in a cell) and when I export it to a text file, the value for that cell will have quotes around it and have an unknown/unreadable character (the little boxes) inline with the text. I would like...
8
11072
by: Irene | last post by:
Hi, I have an MS Access Database with 1 Table containing about 2 million records in Unicode (diferent languages). I would like to export the Table to a Text file (CSV, Tab, etc.) Access dows only export about 65,000 at 1 time. Almost an imposible job.
1
3307
by: maryanncanor | last post by:
Hi everyone, My problem is whenever I export a report to a textfile. The output textfile have blank spaces. Here is my query: SELECT ( & '|' & & '|' & ......................and so on .........................AS EXPR1 FROM ;
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6281
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5218
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.