Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to create a report to export to a text file

Status
Not open for further replies.

avayaman

Technical User
Nov 6, 2002
841
CA
I have a member database. I need to export the infomation into a text file in the following format:

John Smith, johnsmith@msn.com
Peter Brown, peterbrown@yahoo.com
.
.
.
.
and so on

The First Name, Last Name & E-Mail are in seperate fields in the same table. I would like to base it on a query, so I can ignore entries with blanks first names & emails as there are some companies in there that can be identified by lack of first name.


Anyone have any idea how to accomplish this?

This is for a club database & we are using a third party election service & that is how they need the format sent to them.


Paul Beddows

Consulting, Avaya/EAS implementation, Training
Vancouver, Canada
E-mail paul at natcoa.com
 
highlight your query name, right click, select Export. From the dropdown, select txt, click okay and export away.

swtrader
-- The trouble with doing something right the first time is that no one appreciates how hard it was.
 
I tried that, but it does not come out in the correct format. I get 3 columns, but still have to format it manually. I somehow need to combine all three fields, insert a space between the the first & last name & a comma between the last name & email address.

Paul Beddows

Consulting, Avaya/EAS implementation, Training
Vancouver, Canada
E-mail paul at natcoa.com
 
What the user is looking for is a comma delimited text file. When you select the file type (after selected Export) choose the one that says "csv". The file will be comma delimited -- no additional formatting is needed.

swtrader
-- The trouble with doing something right the first time is that no one appreciates how hard it was.
 
And what is the actual SQL code of your query ?
You may export to a comma delimited text file a query like this:
Code:
SELECT [First Name] & ' ' & [Last Name] AS fullName, [E-Mail]
FROM yourTable
WHERE Trim([First Name] & '') <> '' AND Trim([E-Mail] & '') <> ''

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks, you put me on the right track. Mission accomplished

Paul Beddows

Consulting, Avaya/EAS implementation, Training
Vancouver, Canada
E-mail paul at natcoa.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top